| 1 | /* GNU Objective C Runtime Thread Implementation for PCThreads under GNU/Linux.
|
|---|
| 2 | Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
|---|
| 3 | Contributed by Scott Christley <[email protected]>
|
|---|
| 4 | Condition functions added by: Mircea Oancea <[email protected]>
|
|---|
| 5 |
|
|---|
| 6 | This file is part of GNU CC.
|
|---|
| 7 |
|
|---|
| 8 | GNU CC is free software; you can redistribute it and/or modify it under the
|
|---|
| 9 | terms of the GNU General Public License as published by the Free Software
|
|---|
| 10 | Foundation; either version 2, or (at your option) any later version.
|
|---|
| 11 |
|
|---|
| 12 | GNU CC is distributed in the hope that it will be useful, but WITHOUT ANY
|
|---|
| 13 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|---|
| 14 | FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|---|
| 15 | details.
|
|---|
| 16 |
|
|---|
| 17 | You should have received a copy of the GNU General Public License
|
|---|
| 18 | along with GNU CC; see the file COPYING. If not, write to
|
|---|
| 19 | the Free Software Foundation, 59 Temple Place - Suite 330,
|
|---|
| 20 | Boston, MA 02111-1307, USA. */
|
|---|
| 21 |
|
|---|
| 22 | /* As a special exception, if you link this library with files compiled with
|
|---|
| 23 | GCC to produce an executable, this does not cause the resulting executable
|
|---|
| 24 | to be covered by the GNU General Public License. This exception does not
|
|---|
| 25 | however invalidate any other reasons why the executable file might be
|
|---|
| 26 | covered by the GNU General Public License. */
|
|---|
| 27 |
|
|---|
| 28 | #include <pcthread.h>
|
|---|
| 29 | #include <objc/thr.h>
|
|---|
| 30 | #include "runtime.h"
|
|---|
| 31 |
|
|---|
| 32 | /* Key structure for maintaining thread specific storage */
|
|---|
| 33 | static pthread_key_t _objc_thread_storage;
|
|---|
| 34 |
|
|---|
| 35 | /* Backend initialization functions */
|
|---|
| 36 |
|
|---|
| 37 | /* Initialize the threads subsystem. */
|
|---|
| 38 | int
|
|---|
| 39 | __objc_init_thread_system(void)
|
|---|
| 40 | {
|
|---|
| 41 | /* Initialize the thread storage key */
|
|---|
| 42 | return pthread_key_create(&_objc_thread_storage, NULL);
|
|---|
| 43 | }
|
|---|
|
|---|