1 | /* |
---|
2 | * CORE Semaphore Handler |
---|
3 | * |
---|
4 | * DESCRIPTION: |
---|
5 | * |
---|
6 | * This package is the implementation of the CORE Semaphore Handler. |
---|
7 | * This core object utilizes standard Dijkstra counting semaphores to provide |
---|
8 | * synchronization and mutual exclusion capabilities. |
---|
9 | * |
---|
10 | * COPYRIGHT (c) 1989-1998. |
---|
11 | * On-Line Applications Research Corporation (OAR). |
---|
12 | * Copyright assigned to U.S. Government, 1994. |
---|
13 | * |
---|
14 | * The license and distribution terms for this file may be |
---|
15 | * found in the file LICENSE in this distribution or at |
---|
16 | * http://www.OARcorp.com/rtems/license.html. |
---|
17 | * |
---|
18 | * $Id$ |
---|
19 | */ |
---|
20 | |
---|
21 | #include <rtems/system.h> |
---|
22 | #include <rtems/score/isr.h> |
---|
23 | #include <rtems/score/coresem.h> |
---|
24 | #include <rtems/score/states.h> |
---|
25 | #include <rtems/score/thread.h> |
---|
26 | #include <rtems/score/threadq.h> |
---|
27 | #if defined(RTEMS_MULTIPROCESSING) |
---|
28 | #include <rtems/score/mpci.h> |
---|
29 | #endif |
---|
30 | |
---|
31 | /*PAGE |
---|
32 | * |
---|
33 | * _CORE_semaphore_Flush |
---|
34 | * |
---|
35 | * This function a flushes the semaphore's task wait queue. |
---|
36 | * |
---|
37 | * Input parameters: |
---|
38 | * the_semaphore - the semaphore to be flushed |
---|
39 | * remote_extract_callout - function to invoke remotely |
---|
40 | * status - status to pass to thread |
---|
41 | * |
---|
42 | * Output parameters: NONE |
---|
43 | */ |
---|
44 | |
---|
45 | void _CORE_semaphore_Flush( |
---|
46 | CORE_semaphore_Control *the_semaphore, |
---|
47 | Thread_queue_Flush_callout remote_extract_callout, |
---|
48 | unsigned32 status |
---|
49 | ) |
---|
50 | { |
---|
51 | |
---|
52 | _Thread_queue_Flush( |
---|
53 | &the_semaphore->Wait_queue, |
---|
54 | remote_extract_callout, |
---|
55 | status |
---|
56 | ); |
---|
57 | |
---|
58 | } |
---|