Changeset 1571 for trunk/src/emx/include/InnoTekLIBC/sharedpm.h
- Timestamp:
- Oct 10, 2004, 12:48:19 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/InnoTekLIBC/sharedpm.h
-
Property cvs2svn:cvs-rev
changed from
1.7
to1.8
r1570 r1571 29 29 #include <sys/cdefs.h> 30 30 #include <sys/types.h> 31 #include <sys/signal.h> 31 32 32 33 __BEGIN_DECLS … … 56 57 * The SPM version. 57 58 */ 58 #define SPM_VERSION 0x0001000 059 #define SPM_VERSION 0x00010001 59 60 60 61 /** … … 105 106 __LIBC_EXIT_REASON_MAKE_INT32 = 0x7fffffff 106 107 } __LIBC_EXIT_REASON; 108 109 110 /** 111 * Signal (queued). 112 */ 113 typedef struct __libc_SPMSignal 114 { 115 /** Structure size. */ 116 unsigned cb; 117 /** Pointer to the next signal. */ 118 struct __libc_SPMSignal *pNext; 119 /** Signal info. */ 120 siginfo_t Info; 121 } __LIBC_SPMSIGNAL; 122 /** Pointer to (queued) signal. */ 123 typedef __LIBC_SPMSIGNAL *__LIBC_PSPMSIGNAL; 124 107 125 108 126 /** Inheritance FH Bundle Type. … … 253 271 /** Creation timestamp. */ 254 272 unsigned uTimestamp; 273 /** Incoming signal queue. 274 * This is a LIFO for speed and size. The receiving process will 275 * process them in the correct order of course. 276 * For signals which aren't queable only one signal can be queued. 277 */ 278 __LIBC_PSPMSIGNAL pSigHead; 279 /** Number of queued signals. 280 * After it passes 48 signals, only SIGCHLD will be queued. 281 * This means siqueue() won't work 100% according to spec. */ 282 unsigned cSigsQueued; 255 283 256 284 /** Reserved pool pointer field with default value 0. */ 257 unsigned aReserved[40 - 1 4];285 unsigned aReserved[40 - 16]; 258 286 259 287 /** Number of possible pointers to shared memory starting at pvInherit. … … 379 407 __LIBC_SPMLOADAVG LoadAvg; 380 408 409 /** List of free signal structures. This will reduce 410 * the time spent allocating a signal structure in most cases. 411 * During SPM init 8 signal structures will be allocated and queued. */ 412 __LIBC_PSPMSIGNAL pSigFreeHead; 413 /** Number of free signal structures in the list. 414 * This is used to prevent the list from growing infinitly under stress. 415 * When cSigFree reaches 32 unused signal structures will be freed instead 416 * of put in the list. */ 417 unsigned cSigFree; 418 /** Number of active signals. 419 * This is used to keep a reasonable limit of the number of active signal 420 * structures so a process cannot exhaust the shared memory pool. 421 * The maximum is defined by cSigMaxActive. 422 */ 423 unsigned cSigActive; 424 /** The maximum number of active signals. 425 * This is initialized by the SPM creator but can be adjusted later. 426 */ 427 unsigned cSigMaxActive; 428 381 429 /* The rest of the block, up to cbProcess, is undefined in this version. 382 430 * Future versions of LIBC may use this area assuming it's initalized with zeros. … … 593 641 594 642 /** 643 * Queues a signal on another process. 644 * 645 * @returns 0 on success. 646 * @returns Negative error code (errno.h) on failure. 647 * @param pSignal Signal to queue. 648 * @param pid Pid to queue it on. 649 * @param fQueued Set if the signal type is queued. 650 */ 651 int __libc_spmSigQueue(siginfo_t *pSignal, pid_t pid, int fQueued); 652 653 /** 654 * De-queues one or more pending signals. 655 * @returns Number of de-queued signals on success. 656 * @returns Negative error code (errno.h) on failure. 657 * @param paSignals Where to store the signals. 658 * @param cSignals Size of the signal array. 659 * @param cbSignal Size of one signal entry. 660 */ 661 int __libc_spmSigDequeue(siginfo_t *paSignals, unsigned cSignals, size_t cbSignal); 662 663 664 /** 595 665 * Checks the SPM memory for trouble. 596 666 * -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.