source: rtems/cpukit/score/src/corerwlock.c @ 2d7ae960

4.115
Last change on this file since 2d7ae960 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.4 KB
Line 
1/*
2 *  SuperCore RWLock Handler
3 *
4 *  DESCRIPTION:
5 *
6 *  This package is part of the implementation of the SuperCore RWLock Handler.
7 *
8 *  COPYRIGHT (c) 1989-2006.
9 *  On-Line Applications Research Corporation (OAR).
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.com/license/LICENSE.
14 */
15
16#if HAVE_CONFIG_H
17#include "config.h"
18#endif
19
20#include <rtems/system.h>
21#include <rtems/score/corerwlock.h>
22#include <rtems/score/states.h>
23#include <rtems/score/thread.h>
24#include <rtems/score/threadq.h>
25
26/*
27 *  _CORE_RWLock_Initialize
28 *
29 *  This function initialize a rwlock and sets the initial value based
30 *  on the given count.
31 *
32 *  Input parameters:
33 *    the_rwlock            - the rwlock control block to initialize
34 *    the_rwlock_attributes - the attributes specified at create time
35 *
36 *  Output parameters:  NONE
37 */
38
39void _CORE_RWLock_Initialize(
40  CORE_RWLock_Control       *the_rwlock,
41  CORE_RWLock_Attributes    *the_rwlock_attributes
42)
43{
44
45  the_rwlock->Attributes                = *the_rwlock_attributes;
46/*
47  the_rwlock->number_of_waiting_threads = 0;
48*/
49  the_rwlock->number_of_readers = 0;
50  the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
51
52  _Thread_queue_Initialize(
53    &the_rwlock->Wait_queue,
54    THREAD_QUEUE_DISCIPLINE_FIFO,
55    STATES_WAITING_FOR_RWLOCK,
56    CORE_RWLOCK_TIMEOUT
57  );
58}
Note: See TracBrowser for help on using the repository browser.