00001 #ifndef sch_routines_h
00002 #define sch_routines_h
00003
00004 #include <acbdef.h>
00005
00006 #include <far_pointers.h>
00007 #include <mtxdef.h>
00008 #include <mutexdef.h>
00009 #include <pcbdef.h>
00010
00011 int sch_add_cpu_cap(uint32 cpu_id, uint32 mask, UINT64_PQ prev_mask_p);
00012 int sch_clear_affinity(uint32 cpu_mask, struct _ktb *ktb, uint32 flags, UINT64_PQ prev_mask_p);
00013 int sch_clear_capability(struct _ktb *ktb, uint32 mask, uint32 cpu_id, uint32 flags, UINT64_PQ prev_mask_p);
00014 void sch_wait_kernel_mode (void);
00015 void sch_wait_proc (struct _ktb *wait_queue, struct _ktb *ktb);
00016 void sch_resource_wait (struct _ktb *const ktb, const uint32 rsn);
00017 void sch_resource_wait_ps (struct _ktb *const ktb,const uint32 rsn, const uint32 psl);
00018 int sch_resource_wait_setup (struct _ktb *const ktb, const uint32 rsn);
00019 int sch_remove_cpu_cap(uint32 cpu_id, uint32 mask, UINT64_PQ prev_mask_p);
00020 int sch_set_affinity(uint32 cpu_mask, struct _ktb *ktb, uint32 flags, UINT64_PQ prev_mask_p);
00021 int sch_set_capability(struct _ktb *ktb, uint32 mask, uint32 cpu_id, uint32 flags, UINT64_PQ prev_mask_p);
00022 int sch_acquire_implicit_affinity(struct _ktb *ktb, int obsolete, int cpu_id);
00023 int sch_release_implicit_affinity(struct _ktb *ktb);
00024
00025 int sch_std_clrefr (int efn, struct _pcb *pcb);
00026 struct _mutex *sch_std_iolockr (struct _pcb *pcb);
00027 struct _mutex *sch_std_iolockw (struct _pcb *pcb);
00028 void sch_std_iounlock (struct _pcb *pcb);
00029 void sch_std_lockr (struct _mtx *mtx, struct _pcb *pcb);
00030 void sch_std_lockr_quad (struct _mutex *mutex, struct _pcb *pcb);
00031 int sch_std_lockrexec (struct _mtx *mtx);
00032 int sch_std_lockrexec_quad (struct _mutex *mutex);
00033 void sch_std_lockw (struct _mtx *mtx, struct _pcb *pcb);
00034 int sch_std_lockwexec (struct _mtx *mtx);
00035 int sch_std_lockwexec_quad (struct _mutex *mutex);
00036 int sch_std_lockwnowait (struct _mtx *mtx, struct _pcb *pcb);
00037 int sch_std_lockwnowait_quad (struct _mutex *mutex, struct _pcb *pcb);
00038 int sch_std_postef (int ipid, int incpri, int efn, struct _pcb **pcb_p);
00039 int sch_std_qast (int incpri, struct _acb *acb, struct _pcb **pcb_p);
00040 void sch_std_ravail (int rsn);
00041 void sch_std_unlock (struct _mtx *mtx, struct _pcb *pcb);
00042 void sch_std_unlockexec (struct _mtx *mtx);
00043 void sch_std_unlockexec_quad (struct _mutex *mutex);
00044 int sch_std_wake (int ipid, struct _pcb **pcb_p);
00045
00046 #include<linux/spinlock.h>
00047
00048 void sch_rse(struct _pcb * p, unsigned char class, unsigned char event);
00049 void sch_change_cur_priority(struct _pcb *p, unsigned char newpri);
00050 int sch_wait(struct _pcb * p, struct _wqh * wq);
00051 int sch_waitl(struct _pcb * p, struct _wqh * wq);
00052 void sch_wake(unsigned long pid);
00053 void sch_swpwake(void);
00054 int sch_qast(unsigned long pid, int priclass, struct _acb * a);
00055 void sch_one_sec(void);
00056 int sch_postef(unsigned long ipid, unsigned long priclass, unsigned long efn);
00057 void sch_std_ravail(int rsn);
00058 void sch_newlvl(struct _pcb *p);
00059 void sch_lockw(struct _mtx * m);
00060 void sch_iolockw(void);
00061 void sch_unlockw(struct _mtx * m);
00062 void sch_unlock(struct _mtx * m);
00063 void sch_iounlockw(void);
00064 void sch_iounlock(void);
00065 void sch_chsep(struct _pcb * p,unsigned char newpri);
00066 void sch_chse(struct _pcb * p, unsigned char class);
00067 void sch_chsep2(struct _pcb * p,unsigned char newpri);
00068 int sch_calculate_affinity(int mask);
00069 int sch_acquire_affinity(struct _pcb *pcb, int obsolete, int cpu_id);
00070 int sch_release_affinity(struct _pcb *pcb);
00071
00072 #endif
00073