1. Engineering
  2. Computer Science
  3. hi i need code for this function please c programming...

Question: hi i need code for this function please c programming...

Question details

Hi!

I need code for this function please  C Programming, with explain

bestes!.

Function Allocate memory for TCB Set deadline in TCB Set the TCBs PC to point to the task body Set TCBs SP to point to the stack segment IF start-up mode THEIN exception create task(void(*task body)0, uint deadline) This function creates a task. If the call is made in start- up mode, i.e. the kernel is not running, only the necessary data structures will be created. However, if the call is made in running mode, it will lead to a rescheduling and possibly a context switch Argument task_body: A pointer to the C function holding the code of the task deadline: The kernel will try to schedule the task so it will meet this deadline Return parameter Insert new task in Readylist Return status ELSE Disable interrupts Save context IF first execution THEN Set: not first execution any more Insert new task in Readylist Load conte)xt Description of the functions status, i.e. FAIL/OK ENDIF ENDIF Return status

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution