kernel.h File Reference

kernel data structures used in os.c. More...

#include <avr/io.h>
#include "os.h"

Go to the source code of this file.

Data Structures

struct  create_args_t
 The arguments required to create a task. More...
struct  td_struct
 All the data needed to describe the task, including its context. More...
struct  queue_t
 Contains pointers to head and tail of a linked list. More...

Defines

#define CLOCK8MHZ()   CLKPR = (1<<CLKPCE); CLKPR = 0x00;
#define F_CPU   8000000UL
#define Disable_Interrupt()   asm volatile ("cli"::)
#define Enable_Interrupt()   asm volatile ("sei"::)
#define MAXNAME   MAXPROCESS
#define TICK_CYCLES   (F_CPU / 1000 * TICK)
#define LED_RED_MASK   (uint8_t)(_BV(4) | _BV(7))
#define LED_GREEN_MASK   (uint8_t)(_BV(5) | _BV(6))

Typedefs

typedef void(*) voidfuncvoid_ptr (void)
typedef td_struct task_descriptor_t

Enumerations

enum  task_state_t { DEAD = 0, RUNNING, READY, WAITING }
 This is the set of states that a task can be in at any given time. More...
enum  kernel_request_t {
  NONE = 0, TIMER_EXPIRED, TASK_CREATE, TASK_TERMINATE,
  TASK_NEXT, TASK_GET_ARG, EVENT_INIT, EVENT_WAIT,
  EVENT_SIGNAL, EVENT_BROADCAST, EVENT_SIGNAL_AND_NEXT, EVENT_BROADCAST_AND_NEXT
}
 This is the set of kernel requests, i.e., a request code for each system call. More...


Detailed Description

kernel data structures used in os.c.

CSC 460/560 Real Time Operating Systems - Mantis Cheng

Author:
Scott Craig

Justin Tanner

Definition in file kernel.h.


Define Documentation

 
#define CLOCK8MHZ (  )     CLKPR = (1<<CLKPCE); CLKPR = 0x00;

Disable default prescaler to make processor speed 8 MHz.

Definition at line 18 of file kernel.h.

#define F_CPU   8000000UL

Definition at line 20 of file kernel.h.

 
#define Disable_Interrupt (  )     asm volatile ("cli"::)

Definition at line 22 of file kernel.h.

 
#define Enable_Interrupt (  )     asm volatile ("sei"::)

Definition at line 23 of file kernel.h.

#define MAXNAME   MAXPROCESS

The maximum number of names. Currently the same as the number of tasks.

Definition at line 26 of file kernel.h.

#define TICK_CYCLES   (F_CPU / 1000 * TICK)

The number of clock cycles in one "tick" or 5 ms

Definition at line 29 of file kernel.h.

#define LED_RED_MASK   (uint8_t)(_BV(4) | _BV(7))

LEDs for OS_Abort()

Definition at line 32 of file kernel.h.

#define LED_GREEN_MASK   (uint8_t)(_BV(5) | _BV(6))

LEDs for OS_Abort()

Definition at line 35 of file kernel.h.


Typedef Documentation

typedef void(*) voidfuncvoid_ptr(void)

Definition at line 40 of file kernel.h.

typedef struct td_struct task_descriptor_t

Definition at line 92 of file kernel.h.


Enumeration Type Documentation

enum task_state_t

This is the set of states that a task can be in at any given time.

Enumerator:
DEAD 
RUNNING 
READY 
WAITING 

Definition at line 45 of file kernel.h.

enum kernel_request_t

This is the set of kernel requests, i.e., a request code for each system call.

Enumerator:
NONE 
TIMER_EXPIRED 
TASK_CREATE 
TASK_TERMINATE 
TASK_NEXT 
TASK_GET_ARG 
EVENT_INIT 
EVENT_WAIT 
EVENT_SIGNAL 
EVENT_BROADCAST 
EVENT_SIGNAL_AND_NEXT 
EVENT_BROADCAST_AND_NEXT 

Definition at line 57 of file kernel.h.


Generated on Tue Oct 23 21:49:51 2007 for RTOS by  doxygen 1.5.1