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
054af139
Commit
054af139
authored
Jul 18, 2001
by
Nicola Pero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed backend function of objc_mutex_trylock which was broken
From-SVN: r44104
parent
b8dd1bcd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
gcc/gthr-posix.h
+21
-12
No files found.
gcc/gthr-posix.h
View file @
054af139
...
...
@@ -331,30 +331,39 @@ __gthread_objc_mutex_deallocate(objc_mutex_t mutex)
static
inline
int
__gthread_objc_mutex_lock
(
objc_mutex_t
mutex
)
{
if
(
__gthread_active_p
())
return
pthread_mutex_lock
((
pthread_mutex_t
*
)
mutex
->
backend
);
else
return
0
;
if
(
__gthread_active_p
()
&&
pthread_mutex_lock
((
pthread_mutex_t
*
)
mutex
->
backend
)
!=
0
)
{
return
-
1
;
}
return
0
;
}
/* Try to grab a lock on a mutex. */
static
inline
int
__gthread_objc_mutex_trylock
(
objc_mutex_t
mutex
)
{
if
(
__gthread_active_p
())
return
pthread_mutex_trylock
((
pthread_mutex_t
*
)
mutex
->
backend
);
else
return
0
;
if
(
__gthread_active_p
()
&&
pthread_mutex_trylock
((
pthread_mutex_t
*
)
mutex
->
backend
)
!=
0
)
{
return
-
1
;
}
return
0
;
}
/* Unlock the mutex */
static
inline
int
__gthread_objc_mutex_unlock
(
objc_mutex_t
mutex
)
{
if
(
__gthread_active_p
())
return
pthread_mutex_unlock
((
pthread_mutex_t
*
)
mutex
->
backend
);
else
return
0
;
if
(
__gthread_active_p
()
&&
pthread_mutex_unlock
((
pthread_mutex_t
*
)
mutex
->
backend
)
!=
0
)
{
return
-
1
;
}
return
0
;
}
/* Backend condition mutex functions */
...
...
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