mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 18:56:29 +00:00
pthread: do not error from pthread_condattr_setclock dummy
Do not regard a fake condattr object produced by pthread_condattr_init as invalid when passed to no-op dummies. Fix #2471
This commit is contained in:
parent
ad6c94bb09
commit
2d8bfd8569
@ -537,7 +537,7 @@ extern "C" {
|
||||
if (!attr)
|
||||
return EINVAL;
|
||||
|
||||
*attr = 0;
|
||||
*attr = nullptr;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -545,11 +545,10 @@ extern "C" {
|
||||
|
||||
int pthread_condattr_destroy(pthread_condattr_t *attr)
|
||||
{
|
||||
if (!attr || !*attr)
|
||||
/* assert that the attr was produced by the init no-op */
|
||||
if (!attr || *attr != nullptr)
|
||||
return EINVAL;
|
||||
|
||||
warning(__func__, " not implemented yet");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -557,7 +556,8 @@ extern "C" {
|
||||
int pthread_condattr_setclock(pthread_condattr_t *attr,
|
||||
clockid_t clock_id)
|
||||
{
|
||||
if (!attr || !*attr)
|
||||
/* assert that the attr was produced by the init no-op */
|
||||
if (!attr || *attr != nullptr)
|
||||
return EINVAL;
|
||||
|
||||
warning(__func__, " not implemented yet");
|
||||
|
Loading…
Reference in New Issue
Block a user