svn commit: trunk/uClibc/libpthread/linuxthreads.old

psm at uclibc.org psm at uclibc.org
Thu Jan 26 22:30:54 UTC 2006


Author: psm
Date: 2006-01-26 14:30:50 -0800 (Thu, 26 Jan 2006)
New Revision: 13622

Log:
prototypes for threads too

Modified:
   trunk/uClibc/libpthread/linuxthreads.old/lockfile.c
   trunk/uClibc/libpthread/linuxthreads.old/mutex.c
   trunk/uClibc/libpthread/linuxthreads.old/oldsemaphore.c
   trunk/uClibc/libpthread/linuxthreads.old/ptfork.c
   trunk/uClibc/libpthread/linuxthreads.old/pthread.c
   trunk/uClibc/libpthread/linuxthreads.old/semaphore.c


Changeset:
Modified: trunk/uClibc/libpthread/linuxthreads.old/lockfile.c
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/lockfile.c	2006-01-26 22:19:01 UTC (rev 13621)
+++ trunk/uClibc/libpthread/linuxthreads.old/lockfile.c	2006-01-26 22:30:50 UTC (rev 13622)
@@ -27,8 +27,8 @@
 /* Note: glibc puts flockfile, funlockfile, and ftrylockfile in both
  * libc and libpthread.  In uClibc, they are now in libc only.  */
 
-void
-__fresetlockfiles (void)
+void __fresetlockfiles (void);
+void __fresetlockfiles (void)
 {
   FILE *fp;
   pthread_mutexattr_t attr;

Modified: trunk/uClibc/libpthread/linuxthreads.old/mutex.c
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/mutex.c	2006-01-26 22:19:01 UTC (rev 13621)
+++ trunk/uClibc/libpthread/linuxthreads.old/mutex.c	2006-01-26 22:30:50 UTC (rev 13622)
@@ -225,6 +225,7 @@
 strong_alias (__pthread_mutexattr_settype, __pthread_mutexattr_setkind_np)
 weak_alias (__pthread_mutexattr_setkind_np, pthread_mutexattr_setkind_np)
 
+int __pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *kind) attribute_hidden;
 int __pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *kind)
 {
   *kind = attr->__mutexkind;
@@ -235,6 +236,8 @@
 weak_alias (__pthread_mutexattr_getkind_np, pthread_mutexattr_getkind_np)
 
 int __pthread_mutexattr_getpshared (const pthread_mutexattr_t *attr attribute_unused,
+				   int *pshared) attribute_hidden;
+int __pthread_mutexattr_getpshared (const pthread_mutexattr_t *attr attribute_unused,
 				   int *pshared)
 {
   *pshared = PTHREAD_PROCESS_PRIVATE;
@@ -242,6 +245,7 @@
 }
 weak_alias (__pthread_mutexattr_getpshared, pthread_mutexattr_getpshared)
 
+int __pthread_mutexattr_setpshared (pthread_mutexattr_t *attr attribute_unused, int pshared) attribute_hidden;
 int __pthread_mutexattr_setpshared (pthread_mutexattr_t *attr attribute_unused, int pshared)
 {
   if (pshared != PTHREAD_PROCESS_PRIVATE && pshared != PTHREAD_PROCESS_SHARED)
@@ -334,16 +338,19 @@
  * and reset them back to NEVER.
  */
 
+void __pthread_once_fork_prepare(void);
 void __pthread_once_fork_prepare(void)
 {
   __pthread_mutex_lock(&once_masterlock);
 }
 
+void __pthread_once_fork_parent(void);
 void __pthread_once_fork_parent(void)
 {
   __pthread_mutex_unlock(&once_masterlock);
 }
 
+void __pthread_once_fork_child(void);
 void __pthread_once_fork_child(void)
 {
   __pthread_mutex_init(&once_masterlock, NULL);

Modified: trunk/uClibc/libpthread/linuxthreads.old/oldsemaphore.c
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/oldsemaphore.c	2006-01-26 22:19:01 UTC (rev 13621)
+++ trunk/uClibc/libpthread/linuxthreads.old/oldsemaphore.c	2006-01-26 22:30:50 UTC (rev 13622)
@@ -53,6 +53,7 @@
 
 static void sem_restart_list(pthread_descr waiting);
 
+int __old_sem_init(old_sem_t *sem, int pshared, unsigned int value);
 int __old_sem_init(old_sem_t *sem, int pshared, unsigned int value)
 {
     if (value > SEM_VALUE_MAX) {
@@ -77,6 +78,7 @@
     return 1;
 }
 
+int __old_sem_wait(old_sem_t * sem);
 int __old_sem_wait(old_sem_t * sem)
 {
     long oldstatus, newstatus;
@@ -139,6 +141,7 @@
     }
 }
 
+int __old_sem_trywait(old_sem_t * sem);
 int __old_sem_trywait(old_sem_t * sem)
 {
   long oldstatus, newstatus;
@@ -155,6 +158,7 @@
   return 0;
 }
 
+int __old_sem_post(old_sem_t * sem);
 int __old_sem_post(old_sem_t * sem)
 {
   long oldstatus, newstatus;
@@ -178,6 +182,7 @@
   return 0;
 }
 
+int __old_sem_getvalue(old_sem_t * sem, int * sval);
 int __old_sem_getvalue(old_sem_t * sem, int * sval)
 {
   long status = sem->sem_status;
@@ -188,6 +193,7 @@
   return 0;
 }
 
+int __old_sem_destroy(old_sem_t * sem);
 int __old_sem_destroy(old_sem_t * sem)
 {
   if ((sem->sem_status & 1) == 0) {

Modified: trunk/uClibc/libpthread/linuxthreads.old/ptfork.c
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/ptfork.c	2006-01-26 22:19:01 UTC (rev 13621)
+++ trunk/uClibc/libpthread/linuxthreads.old/ptfork.c	2006-01-26 22:30:50 UTC (rev 13622)
@@ -80,7 +80,8 @@
 
 extern __typeof(fork) __libc_fork;
 
-pid_t attribute_hidden __fork(void)
+pid_t __fork(void) attribute_hidden;
+pid_t __fork(void)
 {
   pid_t pid;
   struct handler_list * prepare, * child, * parent;

Modified: trunk/uClibc/libpthread/linuxthreads.old/pthread.c
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/pthread.c	2006-01-26 22:19:01 UTC (rev 13621)
+++ trunk/uClibc/libpthread/linuxthreads.old/pthread.c	2006-01-26 22:30:50 UTC (rev 13622)
@@ -265,6 +265,7 @@
 /* Allocate real-time signal with highest/lowest available
    priority.  Please note that we don't use a lock since we assume
    this function to be called at program start.  */
+int __libc_allocate_rtsig (int high);
 int __libc_allocate_rtsig (int high)
 {
     if (current_rtmin == -1 || current_rtmin > current_rtmax)
@@ -459,6 +460,7 @@
   on_exit(pthread_onexit_process, NULL);
 }
 
+void __pthread_initialize(void);
 void __pthread_initialize(void)
 {
   pthread_initialize();

Modified: trunk/uClibc/libpthread/linuxthreads.old/semaphore.c
===================================================================
--- trunk/uClibc/libpthread/linuxthreads.old/semaphore.c	2006-01-26 22:19:01 UTC (rev 13621)
+++ trunk/uClibc/libpthread/linuxthreads.old/semaphore.c	2006-01-26 22:30:50 UTC (rev 13622)
@@ -23,6 +23,7 @@
 #include "restart.h"
 #include "queue.h"
 
+int __new_sem_init(sem_t *sem, int pshared, unsigned int value);
 int __new_sem_init(sem_t *sem, int pshared, unsigned int value)
 {
   if (value > SEM_VALUE_MAX) {
@@ -55,6 +56,7 @@
   return did_remove;
 }
 
+int __new_sem_wait(sem_t * sem);
 int __new_sem_wait(sem_t * sem)
 {
   volatile pthread_descr self = thread_self();
@@ -117,6 +119,7 @@
   return 0;
 }
 
+int __new_sem_trywait(sem_t * sem);
 int __new_sem_trywait(sem_t * sem)
 {
   int retval;
@@ -133,6 +136,7 @@
   return retval;
 }
 
+int __new_sem_post(sem_t * sem);
 int __new_sem_post(sem_t * sem)
 {
   pthread_descr self = thread_self();
@@ -174,12 +178,14 @@
   return 0;
 }
 
+int __new_sem_getvalue(sem_t * sem, int * sval);
 int __new_sem_getvalue(sem_t * sem, int * sval)
 {
   *sval = sem->__sem_value;
   return 0;
 }
 
+int __new_sem_destroy(sem_t * sem);
 int __new_sem_destroy(sem_t * sem)
 {
   if (sem->__sem_waiting != NULL) {




More information about the uClibc-cvs mailing list