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

EXTERN_C void asm_switch_context (cpu_stack_t **new_sp, cpu_stack_t **save_sp)
 CPU dependent context switching routines.
static void proc_schedule (void)
 System scheduler: pass CPU control to the next process in the ready queue.
void proc_switch (void)
 Schedule another process *without* adding the current one to the ready list.
void proc_yield (void)
 Co-operative context switch.

Detailed Description

Simple cooperative multitasking scheduler.

Version:
Id
proc.c 1616 2008-08-10 19:41:26Z bernie
Author:
Bernie Innocenti <bernie@codewiz.org>

Stefano Fedrigo <aleph@develer.com>

Definition in file coop.c.


Function Documentation

EXTERN_C void asm_switch_context ( cpu_stack_t **  new_sp,
cpu_stack_t **  save_sp 
)

CPU dependent context switching routines.

Saving and restoring the context on the stack is done by a CPU-dependent support routine which usually needs to be written in assembly.