Mercurial > flash_v2
comparison packages/kernel/current/include/sema.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_SEMA_HXX | 1 #ifndef CYGONCE_KERNEL_SEMA_HXX |
| 2 #define CYGONCE_KERNEL_SEMA_HXX | 2 #define CYGONCE_KERNEL_SEMA_HXX |
| 3 | 3 |
| 4 //========================================================================== | 4 //========================================================================== |
| 5 // | 5 // |
| 6 // sema.hxx | 6 // sema.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/sema.hxx> | 41 // Usage: #include <cyg/kernel/sema.hxx> |
| 42 // | 42 // |
| 43 // | 43 // |
| 44 //####DESCRIPTIONEND#### | 44 //####DESCRIPTIONEND#### |
| 45 // | 45 // |
| 46 //========================================================================== | 46 //========================================================================== |
| 47 | 47 |
| 108 void post(); // Increment count | 108 void post(); // Increment count |
| 109 | 109 |
| 110 cyg_count32 peek(); // Get current count value | 110 cyg_count32 peek(); // Get current count value |
| 111 | 111 |
| 112 inline | 112 inline |
| 113 cyg_bool waiting() // Is anyone waiting? | 113 cyg_bool waiting() // Is anyone waiting? |
| 114 { | 114 { |
| 115 return !queue.empty(); | 115 return !queue.empty(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 }; | 118 }; |
