Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
b5c5a6b4
Commit
b5c5a6b4
authored
Dec 29, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
condition: removed cond_timedwait() and cond_signal_async()
These methods are unused.
parent
0d8ba194
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
38 deletions
+0
-38
condition.c
src/condition.c
+0
-22
condition.h
src/condition.h
+0
-16
No files found.
src/condition.c
View file @
b5c5a6b4
...
...
@@ -50,28 +50,6 @@ void cond_wait(struct condition *cond)
g_cond_wait
(
cond
->
cond
,
cond
->
mutex
);
}
int
cond_timedwait
(
struct
condition
*
cond
,
const
long
sec
)
{
GTimeVal
t
;
g_get_current_time
(
&
t
);
g_time_val_add
(
&
t
,
sec
*
1000000
);
if
(
g_cond_timed_wait
(
cond
->
cond
,
cond
->
mutex
,
&
t
)
==
FALSE
)
return
ETIMEDOUT
;
return
0
;
}
int
cond_signal_async
(
struct
condition
*
cond
)
{
if
(
g_mutex_trylock
(
cond
->
mutex
)
==
FALSE
)
{
g_cond_signal
(
cond
->
cond
);
g_mutex_unlock
(
cond
->
mutex
);
return
0
;
}
return
EBUSY
;
}
void
cond_signal_sync
(
struct
condition
*
cond
)
{
g_cond_signal
(
cond
->
cond
);
...
...
src/condition.h
View file @
b5c5a6b4
...
...
@@ -47,22 +47,6 @@ void cond_leave(struct condition *cond);
void
cond_wait
(
struct
condition
*
cond
);
/**
* Wait for a condition with timeout
*
* @param sec number of seconds to wait for (subject to change)
*
* @return ETIMEDOUT if timed out, 0 if notification was received
*/
int
cond_timedwait
(
struct
condition
*
cond
,
const
long
sec
);
/**
* Notify the thread there is a waiter. This function never blocks.
*
* @return EBUSY if it was unable to lock the mutex, 0 on success
*/
int
cond_signal_async
(
struct
condition
*
cond
);
/**
* Notify the thread synchronously, i.e. wait until it can deliver
* the notification.
*/
...
...
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