* for Linux kernel.
*/
-cfs_task_t this_task =
+struct task_struct this_task =
{ /* umask */ 0,/* blocked*/0, /* pid */ 0, /* pgrp */ 0,
- /* uid,euid,suid,fsuid */ 0, 0, 0, 0,
+ /* uid,euid,suid,fsuid */ 0, 0, 0, 0,
/* gid_t gid,egid,sgid,fsgid */ 0, 0, 0, 0,
/* ngroups*/ 1, /*cgroups*/ 0, /*groups*/ 0,
/* group_info */ NULL,
pid_t current_pid(void)
{
- return cfs_current()->pid;
+ return current->pid;
}
mode_t current_umask(void)
IN BOOLEAN Create
)
{
- PLIST_ENTRY ListEntry = NULL;
+ PLIST_ENTRY ListEntry = NULL;
PTASK_SLOT TaskSlot = NULL;
spin_lock(&(cfs_win_task_manger.Lock));
void
cleanup_task_manager()
{
- PLIST_ENTRY ListEntry = NULL;
+ PLIST_ENTRY ListEntry = NULL;
PTASK_SLOT TaskSlot = NULL;
/* remove ThreadNotifyRoutine: task_manager_notify */
*/
-cfs_task_t *
-cfs_current()
+struct task_struct *
+current
{
HANDLE Pid = PsGetCurrentProcessId();
HANDLE Tid = PsGetCurrentThreadId();
PETHREAD Tet = PsGetCurrentThread();
- PLIST_ENTRY ListEntry = NULL;
+ PLIST_ENTRY ListEntry = NULL;
PTASK_SLOT TaskSlot = NULL;
spin_lock(&(cfs_win_task_manger.Lock));
{
PTASK_SLOT Prev = NULL, Curr = NULL;
-
+
ListEntry = cfs_win_task_manger.TaskList.Flink;
while (ListEntry != (&(cfs_win_task_manger.TaskList))) {
void
schedule_timeout_and_set_state(long state, int64_t time)
{
- cfs_task_t * task = cfs_current();
+ struct task_struct * task = current;
PTASK_SLOT slot = NULL;
if (!task) {
int
wake_up_process(
- cfs_task_t * task
+ struct task_struct * task
)
{
PTASK_SLOT slot = NULL;
sleep_on(wait_queue_head_t *waitq)
{
wait_queue_t link;
-
+
init_waitqueue_entry_current(&link);
add_wait_queue(waitq, &link);
waitq_wait(&link, TASK_INTERRUPTIBLE);