FreeCalypso > hg > freecalypso-sw
comparison nuc-fw/nucleus/sm_defs.h @ 79:947b1f473960
beginning of nuc-fw
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 11 Aug 2013 07:17:25 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
78:2c266d4339ff | 79:947b1f473960 |
---|---|
1 /*************************************************************************/ | |
2 /* */ | |
3 /* Copyright Mentor Graphics Corporation 2002 */ | |
4 /* All Rights Reserved. */ | |
5 /* */ | |
6 /* THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS */ | |
7 /* THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS */ | |
8 /* SUBJECT TO LICENSE TERMS. */ | |
9 /* */ | |
10 /*************************************************************************/ | |
11 | |
12 /*************************************************************************/ | |
13 /* */ | |
14 /* FILE NAME VERSION */ | |
15 /* */ | |
16 /* sm_defs.h Nucleus PLUS 1.14 */ | |
17 /* */ | |
18 /* COMPONENT */ | |
19 /* */ | |
20 /* SM - Semaphore Management */ | |
21 /* */ | |
22 /* DESCRIPTION */ | |
23 /* */ | |
24 /* This file contains data structure definitions and constants for */ | |
25 /* the Semaphore component. */ | |
26 /* */ | |
27 /* DATA STRUCTURES */ | |
28 /* */ | |
29 /* SM_SCB Semaphore control block */ | |
30 /* SM_SUSPEND Semaphore suspension block */ | |
31 /* */ | |
32 /* FUNCTIONS */ | |
33 /* */ | |
34 /* None */ | |
35 /* */ | |
36 /* DEPENDENCIES */ | |
37 /* */ | |
38 /* cs_defs.h Common service definitions */ | |
39 /* tc_defs.h Thread Control definitions */ | |
40 /* */ | |
41 /* HISTORY */ | |
42 /* */ | |
43 /* DATE REMARKS */ | |
44 /* */ | |
45 /* 03-01-1993 Created initial version 1.0 */ | |
46 /* 04-19-1993 Verified version 1.0 */ | |
47 /* 03-01-1994 Moved include files outside of */ | |
48 /* the file #ifndef to allow the */ | |
49 /* use of actual data structures, */ | |
50 /* removed protection structure, */ | |
51 /* put padding into structure, */ | |
52 /* resulting in version 1.1 */ | |
53 /* */ | |
54 /* 03-18-1994 Verified version 1.1 */ | |
55 /* 04-17-1996 updated to version 1.2 */ | |
56 /* 03-24-1998 Released version 1.3 */ | |
57 /* 03-26-1999 Released 1.11m (new release */ | |
58 /* numbering scheme) */ | |
59 /* 04-17-2002 Released version 1.13m */ | |
60 /* 11-07-2002 Released version 1.14 */ | |
61 /*************************************************************************/ | |
62 | |
63 #include "cs_defs.h" /* Common service constants */ | |
64 #include "tc_defs.h" /* Thread control constants */ | |
65 | |
66 | |
67 /* Check to see if the file has been included already. */ | |
68 | |
69 #ifndef SM_DEFS | |
70 #define SM_DEFS | |
71 | |
72 | |
73 /* Define constants local to this component. */ | |
74 | |
75 #define SM_SEMAPHORE_ID 0x53454d41UL | |
76 | |
77 | |
78 /* Define the Semaphore Control Block data type. */ | |
79 | |
80 typedef struct SM_SCB_STRUCT | |
81 { | |
82 CS_NODE sm_created; /* Node for linking to */ | |
83 /* created semaphore list */ | |
84 UNSIGNED sm_id; /* Internal SCB ID */ | |
85 CHAR sm_name[NU_MAX_NAME]; /* Semaphore name */ | |
86 UNSIGNED sm_semaphore_count; /* Counting semaphore */ | |
87 BOOLEAN sm_fifo_suspend; /* Suspension type flag */ | |
88 #if PAD_1 | |
89 DATA_ELEMENT sm_padding[PAD_1]; | |
90 #endif | |
91 UNSIGNED sm_tasks_waiting; /* Number of waiting tasks*/ | |
92 struct SM_SUSPEND_STRUCT | |
93 *sm_suspension_list; /* Suspension list */ | |
94 } SM_SCB; | |
95 | |
96 | |
97 /* Define the semaphore suspension structure. This structure is allocated | |
98 off of the caller's stack. */ | |
99 | |
100 typedef struct SM_SUSPEND_STRUCT | |
101 { | |
102 CS_NODE sm_suspend_link; /* Link to suspend blocks */ | |
103 SM_SCB *sm_semaphore; /* Pointer to semaphore */ | |
104 TC_TCB *sm_suspended_task; /* Task suspended */ | |
105 STATUS sm_return_status; /* Return status */ | |
106 } SM_SUSPEND; | |
107 | |
108 #endif | |
109 | |
110 | |
111 | |
112 |