X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=kern%2Fproc_p.h;h=a0e87be22ba6f870e0536db7e35edd997cea9a6f;hb=HEAD;hp=8fbb0ed0a723d8ddd5a440c09f8fb519f6c795a6;hpb=efbdba7e2814415234ef47bd10ff888559ea90af;p=bertos.git diff --git a/kern/proc_p.h b/kern/proc_p.h deleted file mode 100644 index 8fbb0ed0..00000000 --- a/kern/proc_p.h +++ /dev/null @@ -1,120 +0,0 @@ -/** - * \file - * - * - * \brief Internal scheduler structures and definitions for processes. - * - * \version $Id$ - * - * \author Bernardo Innocenti - */ - -#ifndef KERN_PROC_P_H -#define KERN_PROC_P_H - -#include -#include /* for cpu_stack_t */ -#include -#include -#include - -typedef struct Process -{ - Node link; /**< Link Process into scheduler lists */ - cpustack_t *stack; /**< Per-process SP */ - iptr_t user_data; /**< Custom data passed to the process */ - -#if CONFIG_KERN_SIGNALS - sigmask_t sig_wait; /**< Signals the process is waiting for */ - sigmask_t sig_recv; /**< Received signals */ -#endif - -#if CONFIG_KERN_PREEMPTIVE - int forbid_cnt; /**< Nesting count for proc_forbid()/proc_permit(). */ -#endif - -#if CONFIG_KERN_HEAP - uint16_t flags; /**< Flags */ - cpustack_t *stack_base; /**< Base of process stack */ - size_t stack_size; /**< Size of process stack */ -#endif - -#if CONFIG_KERN_MONITOR - struct ProcMonitor - { - Node link; - const char *name; - cpustack_t *stack_base; - size_t stack_size; - } monitor; -#endif - -} Process; - - -/** - * \name Flags for Process.flags. - * \{ - */ -#define PF_FREESTACK BV(0) /**< Free the stack when process dies */ -/*\}*/ - - -/** Track running processes. */ -extern REGISTER Process *CurrentProcess; - -/** Track ready processes. */ -extern REGISTER List ProcReadyList; - - -/** Enqueue a task in the ready list. */ -#define SCHED_ENQUEUE(proc) ADDTAIL(&ProcReadyList, &(proc)->link) - -/** Schedule to another process *without* adding the current to the ready list. */ -void proc_schedule(void); - -#if CONFIG_KERN_MONITOR - /** Initialize the monitor */ - void monitor_init(void); - - /** Register a process into the monitor */ - void monitor_add(Process *proc, const char *name, cpustack_t *stack, size_t stacksize); - - /** Unregister a process from the monitor */ - void monitor_remove(Process *proc); - - /** Rename a process */ - void monitor_rename(Process *proc, const char* name); -#endif /* CONFIG_KERN_MONITOR */ - -#endif /* KERN_PROC_P_H */ -