Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-rtos by
rtx/rt_Semaphore.h@43:fd9580752759, 2014-10-08 (annotated)
- Committer:
- olympux
- Date:
- Wed Oct 08 19:29:49 2014 +0000
- Revision:
- 43:fd9580752759
- Parent:
- 31:015df9e602b6
Added Nucleo STM32F030R8T6 board
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
emilmont | 6:350b53afb889 | 1 | /*---------------------------------------------------------------------------- |
emilmont | 6:350b53afb889 | 2 | * RL-ARM - RTX |
emilmont | 6:350b53afb889 | 3 | *---------------------------------------------------------------------------- |
emilmont | 6:350b53afb889 | 4 | * Name: RT_SEMAPHORE.H |
emilmont | 6:350b53afb889 | 5 | * Purpose: Implements binary and counting semaphores |
emilmont | 6:350b53afb889 | 6 | * Rev.: V4.60 |
emilmont | 6:350b53afb889 | 7 | *---------------------------------------------------------------------------- |
emilmont | 6:350b53afb889 | 8 | * |
emilmont | 6:350b53afb889 | 9 | * Copyright (c) 1999-2009 KEIL, 2009-2012 ARM Germany GmbH |
emilmont | 6:350b53afb889 | 10 | * All rights reserved. |
emilmont | 6:350b53afb889 | 11 | * Redistribution and use in source and binary forms, with or without |
emilmont | 6:350b53afb889 | 12 | * modification, are permitted provided that the following conditions are met: |
emilmont | 6:350b53afb889 | 13 | * - Redistributions of source code must retain the above copyright |
emilmont | 6:350b53afb889 | 14 | * notice, this list of conditions and the following disclaimer. |
emilmont | 6:350b53afb889 | 15 | * - Redistributions in binary form must reproduce the above copyright |
emilmont | 6:350b53afb889 | 16 | * notice, this list of conditions and the following disclaimer in the |
emilmont | 6:350b53afb889 | 17 | * documentation and/or other materials provided with the distribution. |
mbed_official | 31:015df9e602b6 | 18 | * - Neither the name of ARM nor the names of its contributors may be used |
mbed_official | 31:015df9e602b6 | 19 | * to endorse or promote products derived from this software without |
emilmont | 6:350b53afb889 | 20 | * specific prior written permission. |
emilmont | 6:350b53afb889 | 21 | * |
mbed_official | 31:015df9e602b6 | 22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 31:015df9e602b6 | 23 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
emilmont | 6:350b53afb889 | 24 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
emilmont | 6:350b53afb889 | 25 | * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE |
emilmont | 6:350b53afb889 | 26 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
mbed_official | 31:015df9e602b6 | 27 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
mbed_official | 31:015df9e602b6 | 28 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
mbed_official | 31:015df9e602b6 | 29 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
mbed_official | 31:015df9e602b6 | 30 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
emilmont | 6:350b53afb889 | 31 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
emilmont | 6:350b53afb889 | 32 | * POSSIBILITY OF SUCH DAMAGE. |
emilmont | 6:350b53afb889 | 33 | *---------------------------------------------------------------------------*/ |
emilmont | 6:350b53afb889 | 34 | |
emilmont | 6:350b53afb889 | 35 | /* Functions */ |
emilmont | 6:350b53afb889 | 36 | extern void rt_sem_init (OS_ID semaphore, U16 token_count); |
emilmont | 6:350b53afb889 | 37 | extern OS_RESULT rt_sem_delete(OS_ID semaphore); |
emilmont | 6:350b53afb889 | 38 | extern OS_RESULT rt_sem_send (OS_ID semaphore); |
emilmont | 6:350b53afb889 | 39 | extern OS_RESULT rt_sem_wait (OS_ID semaphore, U16 timeout); |
emilmont | 6:350b53afb889 | 40 | extern void isr_sem_send (OS_ID semaphore); |
emilmont | 6:350b53afb889 | 41 | extern void rt_sem_psh (P_SCB p_CB); |
emilmont | 6:350b53afb889 | 42 | |
emilmont | 6:350b53afb889 | 43 | /*---------------------------------------------------------------------------- |
emilmont | 6:350b53afb889 | 44 | * end of file |
emilmont | 6:350b53afb889 | 45 | *---------------------------------------------------------------------------*/ |
emilmont | 6:350b53afb889 | 46 |