4.104.114.84.95
Last change
on this file since fb27af76 was
fb27af76,
checked in by Joel Sherrill <joel.sherrill@…>, on 11/15/99 at 16:39:01
|
Split ITRON semaphore manager into multiple files.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /* |
---|
2 | * The license and distribution terms for this file may be |
---|
3 | * found in the file LICENSE in this distribution or at |
---|
4 | * http://www.OARcorp.com/rtems/license.html. |
---|
5 | * |
---|
6 | * $Id$ |
---|
7 | */ |
---|
8 | |
---|
9 | #include <itron.h> |
---|
10 | |
---|
11 | #include <rtems/itron/semaphore.h> |
---|
12 | #include <rtems/itron/task.h> |
---|
13 | #include <rtems/score/tod.h> |
---|
14 | |
---|
15 | /* |
---|
16 | * sig_sem - Signal Semaphore |
---|
17 | * |
---|
18 | * This function implements the ITRON 3.0 sig_sem() service. |
---|
19 | */ |
---|
20 | |
---|
21 | ER sig_sem( |
---|
22 | ID semid |
---|
23 | ) |
---|
24 | { |
---|
25 | ITRON_Semaphore_Control *the_semaphore; |
---|
26 | Objects_Locations location; |
---|
27 | CORE_semaphore_Status status; |
---|
28 | |
---|
29 | the_semaphore = _ITRON_Semaphore_Get( semid, &location ); |
---|
30 | switch ( location ) { |
---|
31 | case OBJECTS_REMOTE: /* Multiprocessing not supported */ |
---|
32 | case OBJECTS_ERROR: |
---|
33 | return _ITRON_Semaphore_Clarify_get_id_error( semid ); |
---|
34 | |
---|
35 | case OBJECTS_LOCAL: |
---|
36 | /* |
---|
37 | * XXX maxsemcnt |
---|
38 | */ |
---|
39 | |
---|
40 | status = _CORE_semaphore_Surrender( |
---|
41 | &the_semaphore->semaphore, |
---|
42 | the_semaphore->Object.id, |
---|
43 | NULL /* Multiprocessing not supported */ |
---|
44 | ); |
---|
45 | _Thread_Enable_dispatch(); |
---|
46 | return _ITRON_Semaphore_Translate_core_semaphore_return_code( status ); |
---|
47 | } |
---|
48 | return E_OK; |
---|
49 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.