Skip to contentSkip to conversation

posix: Add missing __real prototypes

PATCH In review Jan Kiszka 2 participants 2 messages Apr 14, 2009 – Apr 15, 2009

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 posix: Add missing __real prototypes

...and clean up a duplicate wrapping.

---

 include/posix/pthread.h        |   36 ++++++++++++++++++++++++++++++++++++
 include/posix/semaphore.h      |    6 ++++++
 src/skins/posix/posix.wrappers |    1 -
 3 files changed, 42 insertions(+), 1 deletions(-)
include/posix/pthread.h +36 -0
index 10176ad..94788c3 100644
@@ -477,6 +477,27 @@ int __real_pthread_setschedparam(pthread_t thread,
 				 const struct sched_param *param);
 int __real_pthread_yield(void);
 
+int __real_pthread_mutexattr_init(pthread_mutexattr_t *attr);
+
+int __real_pthread_mutexattr_destroy(pthread_mutexattr_t *attr);
+
+int __real_pthread_mutexattr_gettype(const pthread_mutexattr_t *attr,
+				     int *type);
+
+int __real_pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+
+int __real_pthread_mutexattr_getprotocol(const pthread_mutexattr_t *attr,
+					 int *proto);
+
+int __real_pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr,
+					 int proto);
+
+int __real_pthread_mutexattr_getpshared(const pthread_mutexattr_t *attr,
+					int *pshared);
+
+int __real_pthread_mutexattr_setpshared(pthread_mutexattr_t *attr,
+					int pshared);
+
 int __real_pthread_mutex_init(pthread_mutex_t *mutex,
 			      const pthread_mutexattr_t *attr);
 
@@ -491,6 +512,21 @@ int __real_pthread_mutex_trylock(pthread_mutex_t *mutex);
 
 int __real_pthread_mutex_unlock(pthread_mutex_t *mutex);
 
+int __real_pthread_condattr_init(pthread_condattr_t *attr);
+
+int __real_pthread_condattr_destroy(pthread_condattr_t *attr);
+
+int __real_pthread_condattr_getclock(const pthread_condattr_t *attr,
+				     clockid_t *clk_id);
+
+int __real_pthread_condattr_setclock(pthread_condattr_t *attr,
+			      clockid_t clk_id);
+
+int __real_pthread_condattr_getpshared(const pthread_condattr_t *attr,
+				       int *pshared);
+
+int __real_pthread_condattr_setpshared(pthread_condattr_t *attr, int pshared);
+
 int __real_pthread_cond_init (pthread_cond_t *cond,
 			      const pthread_condattr_t *attr);
 
include/posix/semaphore.h +6 -0
index 8532112..fc27d50 100644
@@ -121,6 +121,12 @@ int __real_sem_post(sem_t *sem);
 
 int __real_sem_wait(sem_t *sem);
 
+int __real_sem_timedwait(sem_t *sem, const struct timespec *abs_timeout);
+
+int __real_sem_trywait(sem_t *sem);
+
+int __real_sem_getvalue(sem_t *sem, int *value);
+
 sem_t *__real_sem_open(const char *name, int oflags, ...);
 
 int __real_sem_close(sem_t *sem);
src/skins/posix/posix.wrappers +0 -1
index ddfe0d7..776c5d5 100644
@@ -83,7 +83,6 @@
 --wrap timer_gettime
 --wrap ftruncate
 --wrap ftruncate64
---wrap close
 --wrap shm_open
 --wrap shm_unlink
 --wrap mmap
#1 lore raw
Quoted 1 line · Jan Kiszka

...and clean up a duplicate wrapping.

Ok. I think however that we should try and use the "restrict" keyword when the POSIX specs ask us to use it (and I know that it is probably missing in some places else).

Signature · 1 line
                                                 Gilles.