Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
7fccd110
Commit
7fccd110
authored
Feb 04, 1999
by
Ulrich Drepper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for Solaris thread library.
From-SVN: r25028
parent
b76354a5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletions
+22
-1
libstdc++/stl/stl_alloc.h
+22
-1
No files found.
libstdc++/stl/stl_alloc.h
View file @
7fccd110
...
...
@@ -58,7 +58,8 @@
# define __RESTRICT
#endif
#if !defined(__STL_PTHREADS) && !defined(_NOTHREADS) \
#if !defined(__STL_PTHREADS) && !defined(__STL_SOLTHREADS) \
&& !defined(_NOTHREADS) \
&& !defined(__STL_SGI_THREADS) && !defined(__STL_WIN32THREADS)
# define _NOTHREADS
#endif
...
...
@@ -75,6 +76,15 @@
# define __NODE_ALLOCATOR_THREADS true
# define __VOLATILE volatile // Needed at -O3 on SGI
# endif
# ifdef __STL_SOLTHREADS
# include <thread.h>
# define __NODE_ALLOCATOR_LOCK \
if (threads) mutex_lock(&_S_node_allocator_lock)
# define __NODE_ALLOCATOR_UNLOCK \
if (threads) mutex_unlock(&_S_node_allocator_lock)
# define __NODE_ALLOCATOR_THREADS true
# define __VOLATILE
# endif
# ifdef __STL_WIN32THREADS
// The lock needs to be initialized by constructing an allocator
// objects of the right type. We do that here explicitly for alloc.
...
...
@@ -358,6 +368,10 @@ private:
static
pthread_mutex_t
_S_node_allocator_lock
;
# endif
# ifdef __STL_SOLTHREADS
static
mutex_t
_S_node_allocator_lock
;
# endif
# ifdef __STL_WIN32THREADS
static
CRITICAL_SECTION
_S_node_allocator_lock
;
static
bool
_S_node_allocator_lock_initialized
;
...
...
@@ -567,6 +581,13 @@ __default_alloc_template<threads, inst>::reallocate(void* __p,
=
PTHREAD_MUTEX_INITIALIZER
;
#endif
#ifdef __STL_SOLTHREADS
template
<
bool
__threads
,
int
__inst
>
mutex_t
__default_alloc_template
<
__threads
,
__inst
>::
_S_node_allocator_lock
=
DEFAULTMUTEX
;
#endif
#ifdef __STL_WIN32THREADS
template
<
bool
__threads
,
int
__inst
>
CRITICAL_SECTION
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment