📄 query.h
字号:
/* tm_wkafter or tm_wkwhen call */#define TS_ABSTIME 0x0400 /* Timed for absolute time */#define TS_VWAIT 0x0200 /* task is Waiting for events */#define TS_SPAWN 0x0100 /* task is waiting to be started. */ /* t_create() sets, t_start() resets */#define TS_SWAIT 0x0080 /* Task is Waiting for semaphore */#define TS_MWAIT 0x0040 /* Task is Waiting for region memory */#define TS_QWAIT 0x0020 /* Task is Waiting for message */#define TS_RWAIT 0x0010 /* Task is Waiting for reply packet */ /* from a remote node */#define TS_MUWAIT 0x0008 /* Task is Waiting for mutex */#define TS_CVWAIT 0x0004 /* Task is Waiting for condition */ /* variable */#define TS_CWAIT 0x0001 /* Task has been blocked by a */ /* componet (pNA+, pHile etc) while */ /* waiting for an internal resource */#define TS_READY 0x0000 /* Task is either currently running */ /* or in runnable state */struct qvinfo { 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 */ ULONG maxlen; /* Max. message length allowed */ };typedef struct qvinfo pqvinfo_t;/************************************************************************//* tsd_info() call returns the following information for a given *//* TSD object. *//************************************************************************/ struct tsdinfo { UCHAR name[4]; /* Name of the Task-specific Data entry */ ULONG flags; /* TSD attributes */ ULONG size; /* Default size of TSD data area */ ULONG obid; /* Object ID of the TSD object */ }; typedef struct tsdinfo ptsdinfo_t; /************************************************************************//* ob_roster() call returns an array of structures of the following *//* type, for a roster of pSOS+ objects. *//************************************************************************/ struct psos_obj_entry { UCHAR name[4]; /* Name of the object */ ULONG id; /* ID of the pSOS+ object */ ULONG type; /* Type of the pSOS+ object */ }; typedef struct psos_obj_entry ppsos_obj_entry_t; /*----------------------------------------------------------------------*//* DEFINITIONS FOR PSOS OBJECT TYPES *//*----------------------------------------------------------------------*/#define OT_UNUSED 0 /* UNUSED */#define OT_ALL 0 /* ALL OBJECTS */#define OT_TASK 1 /* TASK*/#define OT_QUEUE 2 /* QUEUE*/#define OT_SEM 3 /* SEMAPHORE*/#define OT_REGION 4 /* REGION*/#define OT_PART 5 /* PARTITION*/#define OT_MUTEX 6 /* MUTEX */#define OT_CVAR 7 /* CONDITION VARIABLE */#define OT_TSD 8 /* TASK-SPECIFIC DATA CB *//*----------------------------------------------------------------------*//* The following object type will be returned by the type field in the *//* object information structure(s) returned by ob_roster(), if the *//* the pSOS+ object is a variable-length message queue. Note, however *//* that it cannot be passed as an input type argument to the call. *//*----------------------------------------------------------------------*/#define OT_VQUEUE 9 /* VARIABLE-LENGTH MESSAGE QUEUE */ /************************************************************************//* sys_info() call returns a combination of data for various keys *//************************************************************************//*----------------------------------------------------------------------*//* DEFINITIONS FOR INPUT KEY TO SYS_INFO() *//*----------------------------------------------------------------------*/#define PSOS_VERSION 0#define PSOS_ROSTER 1#define PSOS_IOJT 2#define PSOS_DNT 3#define PSOS_CALLOUT 4 /*----------------------------------------------------------------------*//* sys_info() call returns node roster as an array of structures of the *//* following type. *//*----------------------------------------------------------------------*/struct psos_node_entry { USHORT nodenum; /* Node number */ USHORT seqnum; /* Sequence number of node */ }; typedef struct psos_node_entry ppsos_node_entry_t; /*----------------------------------------------------------------------*//* sys_info() call returns the run-time pSOS+ IO jump table as an array *//* of structures of the following type. *//*----------------------------------------------------------------------*/struct psos_iojt_entry { IOJENT iojte; /* IOJT entry information */ ULONG devnum; /* Device number of IOJT entry */ }; typedef struct psos_iojt_entry ppsos_iojt_entry_t; /*----------------------------------------------------------------------*//* sys_info() call returns the run-time pSOS+ Device Name Table as an *//* array of structures of the following type. For device name, a str of *//* length, (kd_dnlen+1) rounded to nearest long-word size, is returned. *//*----------------------------------------------------------------------*/struct psos_dnt_entry { ULONG devnum; /* Major-minor device number */ char devname[1]; /* Null terminated device name string */ }; typedef struct psos_dnt_entry ppsos_dnt_entry_t; /*----------------------------------------------------------------------*//* sys_info() call returns pSOS+ callout(CO) information as an array *//* of structures of the following type. *//*----------------------------------------------------------------------*/struct psos_co_entry { ULONG coid; /* Unique ID of this CO */ ULONG type; /* Type of this CO */ void (*func ) (void *, CO_INFO *); /* Ptr to CO function */ void *arg; /* Argument to CO function */ }; typedef struct psos_co_entry ppsos_co_entry_t;/*----------------------------------------------------------------------*//* Function prototypes for Query Services *//*----------------------------------------------------------------------*/ULONG QueryLibRegister(void);ULONG QueryLibUnregister(void); ULONG pt_info (ULONG ptid, struct ptinfo *buf);ULONG q_info(ULONG qid, struct qinfo *buf);ULONG q_vinfo(ULONG qvid, struct qvinfo *buf);ULONG rn_info(ULONG rnid, struct rninfo *buf);ULONG sm_info(ULONG smid, struct sminfo *buf);ULONG t_info(ULONG tid, struct tinfo *buf);ULONG cv_info(ULONG cvid, struct cvinfo *buf);ULONG mu_info(ULONG muid, struct muinfo *buf);ULONG tsd_info(ULONG tsdid, struct tsdinfo *buf); ULONG ob_roster(ULONG otype, void *buf, ULONG buflen, ULONG *actlen);ULONG sys_info(ULONG key, void *buf, ULONG buflen, ULONG *actlen);#ifdef __cplusplus}#endif#endif /* _PSOS_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -