5
Last change
on this file since 0e16fa45 was
4a03e752,
checked in by Sebastian Huber <sebastian.huber@…>, on 01/13/17 at 08:45:59
|
configure: Remove SIZEOF_PTHREAD_SPINLOCK_T
|
-
Property mode set to
100644
|
File size:
827 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief POSIX Function Initializes a Spinlock Instance |
---|
5 | * @ingroup POSIXAPI |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * POSIX Spinlock Manager -- Initialize a Spinlock Instance |
---|
10 | * |
---|
11 | * COPYRIGHT (c) 1989-2006. |
---|
12 | * On-Line Applications Research Corporation (OAR). |
---|
13 | * |
---|
14 | * Copyright (c) 2016 embedded brains GmbH |
---|
15 | * |
---|
16 | * The license and distribution terms for this file may be |
---|
17 | * found in the file LICENSE in this distribution or at |
---|
18 | * http://www.rtems.org/license/LICENSE. |
---|
19 | */ |
---|
20 | |
---|
21 | #if HAVE_CONFIG_H |
---|
22 | #include "config.h" |
---|
23 | #endif |
---|
24 | |
---|
25 | #include <rtems/posix/spinlockimpl.h> |
---|
26 | |
---|
27 | int pthread_spin_init( |
---|
28 | pthread_spinlock_t *spinlock, |
---|
29 | int pshared |
---|
30 | ) |
---|
31 | { |
---|
32 | #if defined(RTEMS_SMP) |
---|
33 | POSIX_Spinlock_Control *the_spinlock; |
---|
34 | |
---|
35 | the_spinlock = _POSIX_Spinlock_Get( spinlock ); |
---|
36 | _SMP_ticket_lock_Initialize( &the_spinlock->Lock ); |
---|
37 | #endif |
---|
38 | return 0; |
---|
39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.