source: rtems/cpukit/posix/src/condsignalsupp.c @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2007.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 */
9
10#if HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#include <pthread.h>
15#include <errno.h>
16
17#include <rtems/system.h>
18#include <rtems/score/object.h>
19#include <rtems/score/states.h>
20#include <rtems/score/watchdog.h>
21#include <rtems/posix/cond.h>
22#include <rtems/posix/time.h>
23#include <rtems/posix/mutex.h>
24
25/*
26 *  _POSIX_Condition_variables_Signal_support
27 *
28 *  A support routine which implements guts of the broadcast and single task
29 *  wake up version of the "signal" operation.
30 */
31
32int _POSIX_Condition_variables_Signal_support(
33  pthread_cond_t            *cond,
34  bool                       is_broadcast
35)
36{
37  register POSIX_Condition_variables_Control *the_cond;
38  Objects_Locations                           location;
39  Thread_Control                             *the_thread;
40
41  the_cond = _POSIX_Condition_variables_Get( cond, &location );
42  switch ( location ) {
43
44    case OBJECTS_LOCAL:
45      do {
46        the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue );
47        if ( !the_thread )
48          the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
49      } while ( is_broadcast && the_thread );
50
51      _Thread_Enable_dispatch();
52
53      return 0;
54
55#if defined(RTEMS_MULTIPROCESSING)
56    case OBJECTS_REMOTE:
57#endif
58    case OBJECTS_ERROR:
59      break;
60  }
61
62  return EINVAL;
63}
Note: See TracBrowser for help on using the repository browser.