Skip to content

Commit d324b1f

Browse files
committed
add function definitions
1 parent 7934593 commit d324b1f

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

libc/newhdrgen/yaml/pthread.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,20 @@ functions:
370370
arguments:
371371
- type: pthread_rwlock_t *__restrict
372372
- type: const struct timespec *__restrict
373+
- name: pthread_rwlock_clockrdlock
374+
standards: POSIX
375+
return_type: int
376+
arguments:
377+
- type: pthread_rwlock_t *__restrict
378+
- type: clockid_t
379+
- type: const struct timespec *__restrict
380+
- name: pthread_rwlock_clockwrlock
381+
standards: POSIX
382+
return_type: int
383+
arguments:
384+
- type: pthread_rwlock_t *__restrict
385+
- type: clockid_t
386+
- type: const struct timespec *__restrict
373387
- name: pthread_rwlock_rdlock
374388
standards: POSIX
375389
return_type: int

libc/spec/posix.td

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,6 +1325,16 @@ def POSIX : StandardSpec<"POSIX"> {
13251325
RetValSpec<IntType>,
13261326
[ArgSpec<RestrictedPThreadRWLockTPtr>, ArgSpec<ConstRestrictStructTimeSpecPtr>]
13271327
>,
1328+
FunctionSpec<
1329+
"pthread_rwlock_clockrdlock",
1330+
RetValSpec<IntType>,
1331+
[ArgSpec<RestrictedPThreadRWLockTPtr>, ArgSpec<ClockIdT>, ArgSpec<ConstRestrictStructTimeSpecPtr>]
1332+
>,
1333+
FunctionSpec<
1334+
"pthread_rwlock_clockwrlock",
1335+
RetValSpec<IntType>,
1336+
[ArgSpec<RestrictedPThreadRWLockTPtr>, ArgSpec<ClockIdT>, ArgSpec<ConstRestrictStructTimeSpecPtr>]
1337+
>,
13281338
FunctionSpec<
13291339
"pthread_rwlock_rdlock",
13301340
RetValSpec<IntType>,

libc/src/pthread/pthread_rwlock_clockrdlock.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515

1616
namespace LIBC_NAMESPACE_DECL {
1717

18-
int pthread_rwlock_clockrdlock(pthread_rwlock_t *rwlock, clockid_t clockid,
19-
const struct timespec *abstime);
18+
int pthread_rwlock_clockrdlock(pthread_rwlock_t *__restrict rwlock,
19+
clockid_t clockid,
20+
const struct timespec *__restrict abstime);
2021

2122
} // namespace LIBC_NAMESPACE_DECL
2223

libc/src/pthread/pthread_rwlock_clockwrlock.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515

1616
namespace LIBC_NAMESPACE_DECL {
1717

18-
int pthread_rwlock_clockwrlock(pthread_rwlock_t *rwlock, clockid_t clockid,
19-
const struct timespec *abstime);
18+
int pthread_rwlock_clockwrlock(pthread_rwlock_t *__restrict rwlock,
19+
clockid_t clockid,
20+
const struct timespec *__restrict abstime);
2021

2122
} // namespace LIBC_NAMESPACE_DECL
2223

0 commit comments

Comments
 (0)