/* rtxcprop.h - class property structures */ /* * RTXC Quadros Version 1.0 * Copyright (c) 1999-2003 * Quadros Systems, Inc. * ALL RIGHTS RESERVED * * THE INFORMATION HEREIN IS CONFIDENTIAL AND PROPRIETARY. * UNAUTHORIZED DISCLOSURE OR DISTRIBUTION IS PROHIBITED. */ #ifndef _RTXCPROP_H /* { */ #define _RTXCPROP_H #pragma options align = mac68k4byte typedef struct _kclassprop KCLASSPROP; typedef struct _levelprop LEVELPROP; /* System Properties */ typedef struct _sysprop { KATTR attributes; /* system attributes */ unsigned long version; /* kernel version number */ char *sysrambase; /* base of system RAM */ ksize_t sysramsize; /* size of system RAM */ char *kernelstackbase; /* base of kernel stack */ ksize_t kernelstacksize; /* size of kernel stack */ #ifdef HAS_Threads /* { */ const KCLASSPROP *plevelclassprop; const LEVELPROP *plevelprop; #else const KCLASSPROP *plevelclassprop; const char *plevelprop; #endif /* } HAS_Threads */ unsigned long reserve1; unsigned long reserve2; } SYSPROP; /* RTXC class properties */ struct _kclassprop { KATTR attributes; KOBJECT n_statics; /* number of statically defined objects */ KOBJECT n_dynamics; /* number of dynamic objects */ short objsize; /* used for calculating offsets */ short totalsize; /* used only to alloc object array RAM */ ksize_t namelen; const char *pstaticnames; }; #ifdef HAS_Threads /* { */ #ifdef HAS_Levels /* { */ /* Level properties */ struct _levelprop { KATTR attributes; KCOUNT n_static; KCOUNT n_dynamic; }; #endif /* } HAS_Levels */ /* Thread properties */ typedef struct _threadprop { KATTR attributes; /* thread attributes */ TLEVEL level; /* thread base level */ TORDER order; /* thread order (priority) */ void (*threadentry)(void *, void *); /* initial - entry point address */ } THREADPROP; #endif /* } HAS_Threads */ #ifdef HAS_EventSources /* { */ /* Event Source properties */ typedef struct _evntsrcprop { KATTR attributes; /* event source attributes (DISABLE only) */ } EVNTSRCPROP; #endif /* } HAS_EventSources */ #ifdef HAS_Counters /* { */ /* Counter properties */ typedef struct _counterprop { KATTR attributes; /* counter attributes (DISABLE only) */ EVNTSRC evntsrc; /* event source associated with counter */ KMODULUS modulus; /* counter modulus value */ } COUNTERPROP; #endif /* } HAS_Counters */ #ifdef HAS_Alarms /* { */ /* Alarm properties */ typedef struct _alarmprop { KATTR attributes; /* alarm attributes */ COUNTER counter; /* counter associated with alarm */ TICKS initial; /* initial count period */ TICKS recycle; /* recycle count period */ } ALARMPROP; #endif /* } HAS_Alarms */ #ifdef HAS_Pipes /* { */ /* RTXC Pipe properties */ typedef struct _pipeprop { KATTR attributes; int numbufs; int bufsize; void * buf; void ** fullbase; void ** freebase; int * sizebase; } PIPEPROP; #endif /* } HAS_Pipes */ #ifdef HAS_Tasks /* { */ /* RTXC Task properties */ typedef struct _taskprop { void (*taskentry)(void); /* initial - entry point address */ char *stackbase; /* initial - stack base */ ksize_t stacksize; /* initial - stack size */ PRIORITY priority; /* initial - priority */ } TASKPROP; #endif /* } HAS_Tasks */ #ifdef HAS_Queues /* { */ /* RTXC Queue properties */ typedef struct _queueprop { KATTR attributes; /* Waiting Order */ char *base; /* address of queue body */ QWIDTH width; /* entry width in (in bytes) */ QDEPTH depth; /* maximum depth (in entries - not bytes) */ QCOUNT current_size; /* usually 0 (empty) but any value <= depth is valid */ } QUEUEPROP; #endif /* } HAS_Queues */ #ifdef HAS_Partitions /* { */ /* RTXC Partition properties */ typedef struct _partprop { KATTR attributes; /* Waiting Order */ char *base; /* root of free pool list */ BLKSIZE size; /* no. of bytes in blocks */ KCOUNT count; /* initial no. blocks in map */ } PARTPROP; #endif /* } HAS_Partitions */ #ifdef HAS_Exceptions /* { */ /* RTXC Exception properties */ typedef struct _excptnprop { KATTR attributes; /* interrupt type */ unsigned char level; /* interrupt level */ unsigned char vector; /* vector # */ void (*handler)(void); /* initial - entry point address */ } EXCPTNPROP; #endif /* } HAS_Exceptions */ #ifdef HAS_Semaphores /* { */ /* RTXC Semaphore properties */ typedef struct _semaprop { KATTR attributes; /* Signal Type, Waiting Order */ } SEMAPROP; #endif /* } HAS_Semaphores */ #ifdef HAS_Mailboxes /* { */ /* RTXC Message envelope */ typedef struct _msgenv MSGENV; struct _msgenv { MSGENV *flink; /* fore-link to next message in mbox */ MSGENV *blink; /* back-link to next message in mbox */ MSG_PRIORITY priority; /* message priority - must be adjacent to links */ MBOX mbox; /* mbox */ void *p; /* reserved for internal system use */ TASK task; /* task to acknowledge (0=already ACKed) */ char state; /* reserved - ENV_MBOX or ENV_READ */ void *data; /* message datum - typically points to message body */ }; #endif /* } HAS_Mailboxes */ #ifdef HAS_Mailboxes /* { */ /* RTXC Mailbox properties */ typedef struct _mboxprop { KATTR attributes; /* Waiting Order */ } MBOXPROP; #endif /* } HAS_Mailboxes */ #ifdef HAS_Mutexes /* { */ /* RTXC Mutex properties */ typedef struct _mutxprop { KATTR attributes; /* Waiting Order, Priority Inversion */ } MUTXPROP; #endif /* } HAS_Mutexes */ /* high level application property struct for Mrtxcinit() */ typedef struct _appprop { const SYSPROP *psysprop; #ifdef HAS_Threads /* { */ const KCLASSPROP *pthreadclassprop; const THREADPROP *pthreadprop; #endif /* } HAS_Threads */ #ifdef HAS_Tasks /* { */ const KCLASSPROP *ptaskclassprop; const TASKPROP *ptaskprop; #endif /* } HAS_Tasks */ #ifdef HAS_Semaphores /* { */ const KCLASSPROP *psemaclassprop; const SEMAPROP *psemaprop; #endif /* } HAS_Semaphores */ #ifdef HAS_Mailboxes /* { */ const KCLASSPROP *pmboxclassprop; const MBOXPROP *pmboxprop; #endif /* } HAS_Mailboxes */ #ifdef HAS_Partitions /* { */ const KCLASSPROP *ppartclassprop; const PARTPROP *ppartprop; #endif /* } HAS_Partitions */ #ifdef HAS_Queues /* { */ const KCLASSPROP *pqueueclassprop; const QUEUEPROP *pqueueprop; #endif /* } HAS_Queues */ #ifdef HAS_Mutexes /* { */ const KCLASSPROP *pmutxclassprop; const MUTXPROP *pmutxprop; #endif /* } HAS_Mutexes */ #ifdef HAS_EventSources /* { */ const KCLASSPROP *pevntsrcclassprop; const EVNTSRCPROP *pevntsrcprop; #endif /* } HAS_EventSources */ #ifdef HAS_Counters /* { */ const KCLASSPROP *pcounterclassprop; const COUNTERPROP *pcounterprop; #endif /* } HAS_Counters */ #ifdef HAS_Alarms /* { */ const KCLASSPROP *palarmclassprop; const ALARMPROP *palarmprop; #endif /* } HAS_Alarms */ #ifdef HAS_Pipes /* { */ const KCLASSPROP *ppipeclassprop; const PIPEPROP *ppipeprop; #endif /* } HAS_Pipes */ #ifdef HAS_Exceptions /* { */ const KCLASSPROP *pexcptnclassprop; const EXCPTNPROP *pexcptnprop; #endif /* } HAS_Exceptions */ } APPPROP; #pragma options align = reset #endif /* } _RTXCPROP_H */ /* end of file - rtxcprop.h */