unsigned long index;
void *item;
};
-
+
#define RADIX_TREE_INIT(mask) { \
NOT_IMPLEMENTED \
}
node->index = idx;
node->item = item;
list_add_tail(&node->_node, &root->list);
- root->rnode = (void *)1001;
+ root->rnode = (void *)1001;
return 0;
}
EXPORT_SYMBOL(libcfs_arch_init);
EXPORT_SYMBOL(libcfs_arch_cleanup);
+EXPORT_SYMBOL(cfs_enter_debugger);
EXPORT_SYMBOL(cfs_daemonize);
EXPORT_SYMBOL(cfs_daemonize_ctxt);
EXPORT_SYMBOL(cfs_block_allsigs);
tage = tage_alloc(CFS_ALLOC_ATOMIC);
if (tage == NULL) {
if (printk_ratelimit())
- printk(KERN_WARNING
+ printk(KERN_WARNING
"cannot allocate a tage (%ld)\n",
tcd->tcd_cur_pages);
return NULL;
CFS_INIT_LIST_HEAD(&pc.pc_pages);
spin_lock_init(&pc.pc_lock);
- cfs_list_for_each_entry_safe_typed(tage, tmp, &tcd->tcd_pages,
+ cfs_list_for_each_entry_safe_typed(tage, tmp, &tcd->tcd_pages,
struct trace_page, linkage) {
if (pgcount-- == 0)
break;
{
libcfs_debug_msg(NULL, 0, D_EMERG, file, func, line,
"ASSERTION(%s) failed\n", expr);
+ /* cfs_enter_debugger(); */
lbug_with_loc(file, func, line);
}
EXPORT_SYMBOL(libcfs_assertion_failed);
{
LASSERT(c != NULL);
do {
- if (wait_handler)
+ if (wait_handler)
wait_handler(1000);
else
break;
{
LASSERT(c != NULL);
do {
- if (wait_handler)
+ if (wait_handler)
wait_handler(1000);
else
break;
(void)link;
}
-int64_t cfs_waitq_timedwait(struct cfs_waitlink *link, cfs_task_state_t state,
+int64_t cfs_waitq_timedwait(struct cfs_waitlink *link, cfs_task_state_t state,
int64_t timeout)
{
LASSERT(link != NULL);
void cfs_schedule_timeout(cfs_task_state_t state, int64_t timeout)
{
- cfs_waitlink_t l;
+ cfs_waitlink_t l;
/* sleep(timeout) here instead? */
cfs_waitq_timedwait(&l, state, timeout);
}
-void
+void
cfs_pause(cfs_duration_t d)
{
struct timespec s;
-
+
cfs_duration_nsec(d, &s);
nanosleep(&s, NULL);
}
*/
struct lustre_thread_arg {
- cfs_thread_t f;
+ cfs_thread_t f;
void *arg;
};
static void *cfs_thread_helper(void *data)
void *arg = targ->arg;
free(targ);
-
+
(void)f(arg);
return NULL;
}
if ( targ_p == NULL )
return -ENOMEM;
-
+
targ_p->f = func;
targ_p->arg = arg;
- pthread_attr_init(&tattr);
+ pthread_attr_init(&tattr);
pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_DETACHED);
rc = pthread_create(&tid, &tattr, cfs_thread_helper, targ_p);
pthread_attr_destroy(&tattr);
{
cfs_sigset_t old;
int rc;
-
+
rc = sigprocmask(SIG_SETMASK, &blocks, &old);
LASSERT (rc == 0);
* Return Value:
* void: N/A
*
- * Notes:
+ * Notes:
* N/A
*/
void * context
)
{
- cfs_thread_context_t * thread_context =
+ cfs_thread_context_t * thread_context =
(cfs_thread_context_t *) context;
/* Execute the specified function ... */
}
/* Free the context memory */
-
+
cfs_free(context);
/* Terminate this system thread */
* Return Value:
* int: 0 on success or error codes
*
- * Notes:
+ * Notes:
* N/A
*/
* If the symbol is in the table, return the address of it.
* If not, return NULL.
*
- * Notes:
+ * Notes:
* N/A
*/
if (!strcmp(sym->name, name)) {
sym->ref ++;
break;
- }
- }
+ }
+ }
up_read(&cfs_symbol_lock);
- if (sym != NULL)
+ if (sym != NULL)
return sym->value;
return NULL;
* Return Value:
* N/A
*
- * Notes:
+ * Notes:
* N/A
*/
LASSERT(sym->ref > 0);
sym->ref--;
break;
- }
- }
+ }
+ }
up_read(&cfs_symbol_lock);
LASSERT(sym != NULL);
* Return Value:
* N/A
*
- * Notes:
+ * Notes:
* Zero: Succeed to register
* Non-Zero: Fail to register the symbol
*/
* Return Value:
* N/A
*
- * Notes:
+ * Notes:
* N/A
*/
* Return Value:
* N/A
*
- * Notes:
+ * Notes:
* N/A
*/
/* Timer dpc procedure */
-
+
static void
cfs_timer_dpc_proc (
IN PKDPC Dpc,
* Return Value:
* N/A
*
- * Notes:
+ * Notes:
* N/A
*/
* Return Value:
* N/A
*
- * Notes:
+ * Notes:
* N/A
*/
* Return Value:
* N/A
*
- * Notes:
+ * Notes:
* N/A
*/
* Return Value:
* N/A
*
- * Notes:
+ * Notes:
* N/A
*/
* 1: if it's armed.
* 0: if it's not.
*
- * Notes:
+ * Notes:
* N/A
*/
* Return Value:
* the deadline value
*
- * Notes:
+ * Notes:
* N/A
*/
return;
}
+int cfs_need_resched(void)
+{
+ return 0;
+}
+
+void cfs_cond_resched(void)
+{
+}
+
/*
* thread cpu affinity routines
- */
+ */
typedef struct _THREAD_BASIC_INFORMATION {
NTSTATUS ExitStatus;
}
/**
- ** Initialize routines
+ ** Initialize routines
**/
void cfs_libc_init();
int
libcfs_arch_init(void)
-{
+{
int rc;
spinlock_t lock;
cfs_page_p_slab == NULL ){
rc = -ENOMEM;
goto errorout;
- }
+ }
rc = init_task_manager();
if (rc != 0) {
cfs_mem_cache_destroy(cfs_page_p_slab);
}
- return;
+ return;
}
EXPORT_SYMBOL(libcfs_arch_init);