comparison packages/kernel/current/include/sema2.hxx @ 2:443894e2e912 ecos-v1_2_1-release

Block commit of eCos version 1.2.1
author jlarmour
date Tue, 11 May 1999 12:24:34 +0000
parents 3111d98ba7b3
children c38311975d4f
comparison
equal deleted inserted replaced
1:72f549f0d891 2:443894e2e912
1 #ifndef CYGONCE_KERNEL_SEMA2_HXX 1 #ifndef CYGONCE_KERNEL_SEMA2_HXX
2 #define CYGONCE_KERNEL_SEMA2_HXX 2 #define CYGONCE_KERNEL_SEMA2_HXX
3 3
4 //========================================================================== 4 //==========================================================================
5 // 5 //
6 // sema2.hxx 6 // sema2.hxx
7 // 7 //
8 // Semaphore class declarations 8 // Semaphore class declarations
9 // 9 //
10 //========================================================================== 10 //==========================================================================
11 //####COPYRIGHTBEGIN#### 11 //####COPYRIGHTBEGIN####
12 // 12 //
13 // ------------------------------------------- 13 // -------------------------------------------
23 // 23 //
24 // The Original Code is eCos - Embedded Cygnus Operating System, released 24 // The Original Code is eCos - Embedded Cygnus Operating System, released
25 // September 30, 1998. 25 // September 30, 1998.
26 // 26 //
27 // The Initial Developer of the Original Code is Cygnus. Portions created 27 // The Initial Developer of the Original Code is Cygnus. Portions created
28 // by Cygnus are Copyright (C) 1998 Cygnus Solutions. All Rights Reserved. 28 // by Cygnus are Copyright (C) 1998,1999 Cygnus Solutions. All Rights Reserved.
29 // ------------------------------------------- 29 // -------------------------------------------
30 // 30 //
31 //####COPYRIGHTEND#### 31 //####COPYRIGHTEND####
32 //========================================================================== 32 //==========================================================================
33 //#####DESCRIPTIONBEGIN#### 33 //#####DESCRIPTIONBEGIN####
34 // 34 //
35 // Author(s): nickg 35 // Author(s): nickg
36 // Contributors: nickg 36 // Contributors: nickg
37 // Date: 1997-09-09 37 // Date: 1997-09-09
38 // Purpose: Define Semaphore class interfaces 38 // Purpose: Define Semaphore class interfaces
39 // Description: The classes defined here provide the APIs for binary 39 // Description: The classes defined here provide the APIs for binary
40 // and counting semaphores. 40 // and counting semaphores.
41 // Usage: #include <cyg/kernel/sema2.hxx> 41 // Usage: #include <cyg/kernel/sema2.hxx>
42 // 42 //
43 // 43 //
44 //####DESCRIPTIONEND#### 44 //####DESCRIPTIONEND####
45 // 45 //
46 //========================================================================== 46 //==========================================================================
47 47
112 void post(); // Increment count 112 void post(); // Increment count
113 113
114 cyg_count32 peek(); // Get current count value 114 cyg_count32 peek(); // Get current count value
115 115
116 inline 116 inline
117 cyg_bool waiting() // Is anyone waiting? 117 cyg_bool waiting() // Is anyone waiting?
118 { 118 {
119 return !queue.empty(); 119 return !queue.empty();
120 } 120 }
121 121
122 }; 122 };