📄 psos.h
字号:
/*---------------------------------------------------------------------*//* Multi-processor configuration table definitions *//*---------------------------------------------------------------------*/#define KIROSTER 0x00000001 /* KI_ROSTER service provided */#define SEQWRAP_ON 0x00000002 /* Wrap sequence number */#define SEQWRAP_OFF 0x00000000 /* Do not wrap sequence # *//*---------------------------------------------------------------------*//* Roster change Call-outs Definitions *//*---------------------------------------------------------------------*/#define RSTR_NEW 0 /* Node itself is joining */#define RSTR_JOIN 1 /* Another node has joined the system */#define RSTR_EXIT 2 /* Another node has left the system *//*---------------------------------------------------------------------*//* as_catch(), t_mode(), and t_start() Definitions *//*---------------------------------------------------------------------*/#define T_NOPREEMPT 0x00000001 /* Not preemptible bit */#define T_PREEMPT 0x00000000 /* Preemptible */#define T_TSLICE 0x00000002 /* Time-slicing enabled bit */#define T_NOTSLICE 0x00000000 /* No Time-slicing */#define T_NOASR 0x00000004 /* ASRs disabled bit */#define T_ASR 0x00000000 /* ASRs enabled */#define T_SUPV 0x00000000 /* Supervisor mode bit */#define T_USER 0x00000000 /* User mode */#define T_NOISR 0x00000100 /* Interrupts disabled */#define T_ISR 0x00000000 /* Interrupts enabled */#define T_LEVELMASK0 0x00000000 /* Interrupt mask level 0 bits */#define T_LEVELMASK1 0x00000100 /* Interrupt mask level 1 bits */#define T_LEVELMASK2 0x00000100 /* For compatibility with 68K */ #define T_LEVELMASK3 0x00000100 /* For compatibility with 68K */ #define T_LEVELMASK4 0x00000100 /* For compatibility with 68K */ #define T_LEVELMASK5 0x00000100 /* For compatibility with 68K */ #define T_LEVELMASK6 0x00000100 /* For compatibility with 68K */ #define T_LEVELMASK7 0x00000100 /* For compatibility with 68K */ /*---------------------------------------------------------------------*//* ev_receive() Definitions *//*---------------------------------------------------------------------*/#define EV_NOWAIT 0x00000001 /* Don't wait for events */#define EV_WAIT 0x00000000 /* Wait for events */#define EV_ANY 0x00000002 /* Wait for ANY of desired bits */#define EV_ALL 0x00000000 /* Wait for ALL of desired bits *//*---------------------------------------------------------------------*//* k_fatal() Definitions *//*---------------------------------------------------------------------*/#define K_GLOBAL 0x00000001 /* 1 = Global */#define K_LOCAL 0x00000000 /* 0 = Local *//*---------------------------------------------------------------------*//* pt_create() Definitions *//*---------------------------------------------------------------------*/#define PT_GLOBAL 0x00000001 /* 1 = Global */#define PT_LOCAL 0x00000000 /* 0 = Local */#define PT_DEL 0x00000004 /* 1 = Delete regardless */#define PT_NODEL 0x00000000 /* 0 = Delete only if unused *//*---------------------------------------------------------------------*//* q_create() and q_vcreate() Definitions *//*---------------------------------------------------------------------*/#define Q_GLOBAL 0x00000001 /* 1 = Global */#define Q_LOCAL 0x00000000 /* 0 = Local */#define Q_PRIOR 0x00000002 /* Queue by priority */#define Q_FIFO 0x00000000 /* Queue by FIFO order */#define Q_LIMIT 0x00000004 /* Limit message queue */#define Q_NOLIMIT 0x00000000 /* No limit on message queue */#define Q_PRIBUF 0x00000008 /* Use private buffers */#define Q_SYSBUF 0x00000000 /* Use system buffers *//*---------------------------------------------------------------------*//* q_receive() and q_vreceive() Definitions *//*---------------------------------------------------------------------*/#define Q_NOWAIT 0x00000001 /* Don't wait for a message */#define Q_WAIT 0x00000000 /* Wait for a message */#define Q_PEEK 0x00000004 /* Peek at the message at the head */#define Q_DEQUEUE 0x00000000 /* Dequeue the message at the head *//*---------------------------------------------------------------------*//* rn_create() Definitions *//*---------------------------------------------------------------------*/#define RN_PRIOR 0x00000002 /* Queue by priority bit */#define RN_FIFO 0x00000000 /* Queue by FIFO order */#define RN_DEL 0x00000004 /* 1 = Delete regardless */#define RN_NODEL 0x00000000 /* 0 = Delete only if unused *//*---------------------------------------------------------------------*//* rn_getseg() Definitions *//*---------------------------------------------------------------------*/#define RN_NOWAIT 0x00000001 /* Don't wait for memory */#define RN_WAIT 0x00000000 /* Wait for a segment *//*---------------------------------------------------------------------*//* sm_create() Definitions *//*---------------------------------------------------------------------*/#define SM_GLOBAL 0x00000001 /* 1 = Global */#define SM_LOCAL 0x00000000 /* 0 = Local */#define SM_PRIOR 0x00000002 /* Queue by priority */#define SM_FIFO 0x00000000 /* Queue by FIFO order */#define SM_BOUNDED 0x00000004 /* Semaphore count is bounded */#define SM_UNBOUNDED 0x00000000 /* Semaphore count is not bounded *//*---------------------------------------------------------------------*//* sm_p() Definitions *//*---------------------------------------------------------------------*/#define SM_NOWAIT 0x00000001 /* Don't wait for semaphore */#define SM_WAIT 0x00000000 /* Wait for semaphore *//*---------------------------------------------------------------------*//* mu_create() Definitions *//*---------------------------------------------------------------------*/#define MU_GLOBAL 0x00000001 /* 1 = Global */#define MU_LOCAL 0x00000000 /* 0 = Local */#define MU_PRIOR 0x00000002 /* Queue by priority */#define MU_FIFO 0x00000000 /* Queue by FIFO order */#define MU_RECURSIVE 0x00000004 /* Recursive acquisition Allowed */#define MU_NORECURSIVE 0x00000000 /* Recursive acquisition Not Allowed */#define MU_PRIO_NONE 0x00000000 /* No unbounded priority inversion */ /* protection */#define MU_PRIO_INHERIT 0x00000028 /* Priority Inheritance protocol */ /* enabled */#define MU_PRIO_PROTECT 0x00000008 /* Priority Protection protocol */ /* enabled */ /*---------------------------------------------------------------------*//* mu_lock() Definitions *//*---------------------------------------------------------------------*/#define MU_NOWAIT 0x00000001 /* Don't wait for lock */#define MU_WAIT 0x00000000 /* Wait for lock */ /*---------------------------------------------------------------------*//* cv_create() Definitions *//*---------------------------------------------------------------------*/#define CV_GLOBAL 0x00000001 /* 1 = Global */#define CV_LOCAL 0x00000000 /* 0 = Local */#define CV_PRIOR 0x00000002 /* Queue by priority */#define CV_FIFO 0x00000000 /* Queue by FIFO order */ /*---------------------------------------------------------------------*//* cv_wait() Definitions *//*---------------------------------------------------------------------*/#define CV_NOWAIT 0x00000001 /* Don't wait for cv */#define CV_WAIT 0x00000000 /* Wait for cv *//*---------------------------------------------------------------------*//* t_create() Definitions *//*---------------------------------------------------------------------*/#define T_GLOBAL 0x00000001 /* 1 = Global */#define T_LOCAL 0x00000000 /* 0 = Local */#define T_NOFPU 0x00000000 /* Not using FPU */#define T_FPU 0x00000002 /* Using FPU bit *//*---------------------------------------------------------------------*//* tsd_create() definitions *//*---------------------------------------------------------------------*/#define TSD_ALLOC 0x00000001#define TSD_NOALLOC 0x00000000#define TSD_INIT_CLR 0x00000002#define TSD_INIT_COPY 0x00000004#define TSD_INIT_NONE 0x00000000/*---------------------------------------------------------------------*//* sc_register(), sc_unregister() definitions *//*---------------------------------------------------------------------*/#define SVC_ADD 0x00000000 /* Add to UDC's list of svcjtabs */#define SVC_REPLACE 0x00000004 /* Replace UDC's existing svcjtab */#define SVC_WAIT 0x00000000 /* Wait to repl/unreg if active fn*/#define SVC_NOWAIT 0x00000001 /* Don't wait */#define SVC_MINMAJOR 16 /* Minimum valid major no. for SCE*/#define SVC_MAXMAJOR 255 /* Maximum valid major no. for SCE*//*---------------------------------------------------------------------*//* co_register(), co_unregister() definitions *//*---------------------------------------------------------------------*/#define CO_NOWAIT 0x00000001 /* Non-blocking co_unregister() */#define CO_WAIT 0x00000000 /* Blocking co_unregister() */ #define CO_START 0x02 /* Callout type: task startup */#define CO_RESTART 0x04 /* Callout type: task restart */#define CO_DELETE 0x08 /* Callout type: task deletion *//*----------------------------------------------------------------------*//* Autoinit flags *//*----------------------------------------------------------------------*/#define IO_AUTOINIT (1<<8)#define IO_NOAUTOINIT 0#define IO_DEVTYPE_MASK 0x0003#define IO_CHAR_DEV 0x0001#define IO_BLOCK_DEV 0x0002#define IO_STREAM_DEV 0x0003 /*----------------------------------------------------------------------*//* Flags used to specify if an IOJT entry is bound or not *//*----------------------------------------------------------------------*/#define DRV_BOUND 1#define DRV_UNBOUND 0 /************************************************************************//* pSOS+ QUERY SERVICES *//* - type definitions, typedefs, constatnts, function prototypes *//************************************************************************//* cv_info() call returns the following information for a given */ /* condition variable object. *//************************************************************************/struct cvinfo { UCHAR name[4]; /* Name of the Condition Variable */ ULONG flags; /* Object's attributes */ ULONG wqlen; /* No. of waiting tasks */ ULONG wtid; /* Object ID of the first waiting task */ ULONG muid; /* Object ID of the associated mutex */ };typedef struct cvinfo pcvinfo_t;/************************************************************************//* mu_info() call returns the following information for a given mutex *//* object. *//************************************************************************/struct muinfo{ UCHAR name[4]; /* Name of the mutex */ ULONG flags; /* Mutex attributes */ ULONG wqlen; /* No. of waiting tasks */ ULONG wtid; /* Object ID of the first waiting task */ ULONG count; /* Mutex reference (lock) count */ ULONG ownid; /* Mutex owner ID */ ULONG node; /* owner task's node number */ ULONG ceilprio; /* Mutex ceiling priority */ ULONG phpwt; /* Max. of all waiting tasks priorities */};typedef struct muinfo pmuinfo_t;/************************************************************************//* pt_info() call returns the following information for a given *//* partition object. *//************************************************************************/struct ptinfo { UCHAR name[4]; /* Name of the partition */ ULONG flags; /* Partition attributes */ ULONG bsize; /* size of a partition buffer */ ULONG nbufs; /* Total no. of buffers in the partition*/ ULONG nfree; /* Total No. of free buffers. */ ULONG *iaddr; /* Partition start address */ ULONG length; /* Partition length */ };typedef struct ptinfo pptinfo_t;/************************************************************************//* q_info() call returns the following information for a given *//* queue object. *//************************************************************************/struct qinfo { UCHAR name[4]; /* Name of the queue */ ULONG flags; /* Queue attributes */ ULONG wqlen; /* No. of waiting tasks */ ULONG wtid; /* Object ID of the first waiting task */ ULONG mqlen; /* No. of messages in the queue */ ULONG mqmax; /* Max. no. of messages allowed */ ULONG tid_ntfy; /* Task to notify of message arrival */ ULONG ev_ntfy; /* Event to post on message arrival */ };typedef struct qinfo pqinfo_t;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -