}
/*
- * cfs_create_thread
+ * kthread_run
* Create a system thread to execute the routine specified
*
* Arguments:
* func: function to be executed in the thread
* arg: argument transferred to func function
- * flag: thread creation flags.
+ * name: thread name to create
*
* Return Value:
- * int: 0 on success or error codes
+ * cfs_task_t: 0 on success or error codes
*
* Notes:
* N/A
*/
-int cfs_create_thread(int (*func)(void *), void *arg, unsigned long flag)
+cfs_task_t kthread_run(int (*func)(void *), void *arg, char *name)
{
cfs_handle_t thread = NULL;
NTSTATUS status;
context = cfs_alloc(sizeof(cfs_thread_context_t), CFS_ALLOC_ZERO);
if (!context) {
- return -ENOMEM;
+ return ERR_PTR(-ENOMEM);
}
context->func = func;
/* We need translate the nt status to linux error code */
- return cfs_error_code(status);
+ return ERR_PTR(cfs_error_code(status));
}
//
ZwClose(thread);
- return 0;
+ return (cfs_task_t)0;
}
return timer->deadline;
}
-/*
- * daemonize routine stub
- */
-
-void cfs_daemonize(char *str)
+int unshare_fs_struct()
{
- return;
-}
-
-int cfs_daemonize_ctxt(char *str) {
- cfs_daemonize(str);
- return 0;
+ return 0;
}
/*