coop.c File Reference

Simple cooperative multitasking scheduler. More...

#include "proc_p.h"
#include "proc.h"
#include <cfg/log.h>
#include <cpu/irq.h>
#include <cpu/types.h>
#include <cpu/attr.h>
#include <cpu/frame.h>

Go to the source code of this file.

Functions

void coop_yield (void)
 Define function prototypes exported outside.
void coop_switch (void)
 Give the control of the CPU to another process.
void coop_wakeup (Process *proc)
 Immediately wakeup a process, dispatching it to the CPU.

Detailed Description

Simple cooperative multitasking scheduler.

Version:
Id
coop.c 3296 2010-03-29 13:55:34Z batt
Author:
Bernie Innocenti <bernie@codewiz.org>
Stefano Fedrigo <aleph@develer.com>

Definition in file coop.c.


Function Documentation

void coop_switch ( void   ) 

Give the control of the CPU to another process.

Note:
Assume the current process has been already added to a wait queue.
Warning:
This should be considered an internal kernel function, even if it is allowed, usage from application code is strongly discouraged.

Definition at line 70 of file coop.c.

void coop_yield ( void   ) 

Define function prototypes exported outside.

Co-operative context switch.

Required to silent gcc "no previous prototype" warnings.

Definition at line 99 of file coop.c.