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
ba0cf7f7
Commit
ba0cf7f7
authored
23 years ago
by
Nicola Pero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save a function call on mutex locking/unlocking
From-SVN: r44106
parent
8b52df45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
libobjc/thr.c
+4
-4
No files found.
libobjc/thr.c
View file @
ba0cf7f7
...
...
@@ -318,7 +318,7 @@ objc_mutex_lock(objc_mutex_t mutex)
return
-
1
;
/* If we already own the lock then increment depth */
thread_id
=
objc_thread_id
();
thread_id
=
__
objc_thread_id
();
if
(
mutex
->
owner
==
thread_id
)
return
++
mutex
->
depth
;
...
...
@@ -350,7 +350,7 @@ objc_mutex_trylock(objc_mutex_t mutex)
return
-
1
;
/* If we already own the lock then increment depth */
thread_id
=
objc_thread_id
();
thread_id
=
__
objc_thread_id
();
if
(
mutex
->
owner
==
thread_id
)
return
++
mutex
->
depth
;
...
...
@@ -385,7 +385,7 @@ objc_mutex_unlock(objc_mutex_t mutex)
return
-
1
;
/* If another thread owns the lock then abort */
thread_id
=
objc_thread_id
();
thread_id
=
__
objc_thread_id
();
if
(
mutex
->
owner
!=
thread_id
)
return
-
1
;
...
...
@@ -477,7 +477,7 @@ objc_condition_wait(objc_condition_t condition, objc_mutex_t mutex)
return
-
1
;
/* Make sure we are owner of mutex */
thread_id
=
objc_thread_id
();
thread_id
=
__
objc_thread_id
();
if
(
mutex
->
owner
!=
thread_id
)
return
-
1
;
...
...
This diff is collapsed.
Click to expand it.
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