summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-05-29 16:54:52 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-05-29 16:54:52 +0000
commit613cff6f58129ea3280c763c855e48525e92f1dc (patch)
treee35504fb42cdeb98512ed16729340807085960a4 /c
parente941ea131d495a8839a31d10545c9a1e87bf54af (diff)
downloadrtems-613cff6f58129ea3280c763c855e48525e92f1dc.tar.bz2
removed all ifdef's on NOT_IMPLEMENTED.
Diffstat (limited to 'c')
-rw-r--r--c/src/exec/libcsupport/src/utsname.c4
-rw-r--r--c/src/exec/posix/src/aio.c3
-rw-r--r--c/src/exec/posix/src/devctl.c4
-rw-r--r--c/src/exec/posix/src/psignal.c4
-rw-r--r--c/src/exec/posix/src/pthread.c28
-rw-r--r--c/src/exec/posix/src/sched.c4
-rw-r--r--c/src/exec/posix/src/time.c3
-rw-r--r--c/src/exec/posix/src/types.c16
-rw-r--r--c/src/exec/posix/src/unistd.c4
-rw-r--r--c/src/exec/posix/src/utsname.c4
-rw-r--r--c/src/lib/libc/utsname.c4
11 files changed, 30 insertions, 48 deletions
diff --git a/c/src/exec/libcsupport/src/utsname.c b/c/src/exec/libcsupport/src/utsname.c
index dba0fefefb..95ab0e54bb 100644
--- a/c/src/exec/libcsupport/src/utsname.c
+++ b/c/src/exec/libcsupport/src/utsname.c
@@ -45,8 +45,6 @@ int uname(
return 0;
}
-#ifdef NOT_IMPLEMENTED_YET
-
/*PAGE
*
* 4.5.2 Get Process Times, P1003.1b-1993, p. 92
@@ -58,5 +56,3 @@ clock_t times(
{
return POSIX_NOT_IMPLEMENTED();
}
-
-#endif
diff --git a/c/src/exec/posix/src/aio.c b/c/src/exec/posix/src/aio.c
index d740be0c02..07df5ae02f 100644
--- a/c/src/exec/posix/src/aio.c
+++ b/c/src/exec/posix/src/aio.c
@@ -7,8 +7,6 @@
#include <rtems/system.h>
-#ifdef NOT_IMPLEMENTED_YET
-
/*PAGE
*
* 6.7.2 Asynchronous Read, P1003.1b-1993, p. 154
@@ -112,4 +110,3 @@ int aio_fsync(
{
return POSIX_NOT_IMPLEMENTED();
}
-#endif
diff --git a/c/src/exec/posix/src/devctl.c b/c/src/exec/posix/src/devctl.c
index 7caf475784..903375c34d 100644
--- a/c/src/exec/posix/src/devctl.c
+++ b/c/src/exec/posix/src/devctl.c
@@ -7,8 +7,6 @@
#include <rtems/system.h>
-#ifdef NOT_IMPLEMENTED_YET
-
/*PAGE
*
* 21.2.1 Control a Device, P1003.4b/D8, p. 65
@@ -23,5 +21,3 @@ int devctl(
{
return POSIX_NOT_IMPLEMENTED();
}
-
-#endif
diff --git a/c/src/exec/posix/src/psignal.c b/c/src/exec/posix/src/psignal.c
index b8bd3d56ea..cac74021ad 100644
--- a/c/src/exec/posix/src/psignal.c
+++ b/c/src/exec/posix/src/psignal.c
@@ -8,8 +8,6 @@
#include <rtems/system.h>
#include <rtems/score/thread.h>
-#ifdef NOT_IMPLEMENTED_YET
-
/*
* 3.3.2 Send a Signal to a Process, P1003.1b-1993, p. 68
*
@@ -235,8 +233,6 @@ int pause( void )
return POSIX_NOT_IMPLEMENTED();
}
-#endif
-
/*
* 3.4.3 Delay Process Execution, P1003.1b-1993, p. 73
*/
diff --git a/c/src/exec/posix/src/pthread.c b/c/src/exec/posix/src/pthread.c
index cae1bf2380..1296af9e70 100644
--- a/c/src/exec/posix/src/pthread.c
+++ b/c/src/exec/posix/src/pthread.c
@@ -2,6 +2,7 @@
* $Id$
*/
+#include <assert.h>
#include <errno.h>
#include <pthread.h>
#include <limits.h>
@@ -94,9 +95,11 @@ User_extensions_routine _POSIX_Threads_Delete_extension(
void _POSIX_Threads_Initialize_user_tasks( void )
{
+ int status;
unsigned32 index;
unsigned32 maximum;
posix_initialization_tasks_table *user_tasks;
+ pthread_t thread_id;
/*
* NOTE: This is slightly different from the Ada implementation.
@@ -104,9 +107,13 @@ void _POSIX_Threads_Initialize_user_tasks( void )
user_tasks = _POSIX_Threads_User_initialization_tasks;
maximum = _POSIX_Threads_Number_of_initialization_tasks;
+
+ if ( !user_tasks || maximum == 0 )
+ return;
for ( index=0 ; index < maximum ; index++ ) {
- ;
+ status = pthread_create(&thread_id, NULL, user_tasks[ index ].entry, NULL);
+ assert( !status );
}
}
@@ -130,7 +137,6 @@ User_extensions_Control _POSIX_Threads_User_extensions = {
}
};
-
/*PAGE
*
* _POSIX_Threads_Manager_initialization
@@ -174,7 +180,19 @@ void _POSIX_Threads_Manager_initialization(
TRUE
);
- /* XXX add api extensions */
+ /*
+ * Add all the extensions for this API
+ */
+
+ _User_extensions_Add_API_set( &_POSIX_Threads_User_extensions );
+
+ _API_extensions_Add( &_POSIX_Threads_API_extensions );
+
+ /*
+ * If we supported MP, then here we would ...
+ * Register the MP Process Packet routine.
+ */
+
}
/*PAGE
@@ -643,8 +661,6 @@ int pthread_once(
return 0;
}
-#ifdef NOT_IMPLEMENTED_YET
-
/*PAGE
*
* 20.1.6 Accessing a Thread CPU-time Clock, P1003.4b/D8, p. 58
@@ -658,8 +674,6 @@ int pthread_getcpuclockid(
return POSIX_NOT_IMPLEMENTED();
}
-#endif
-
/*PAGE
*
* 20.1.7 CPU-time Clock Thread Creation Attribute, P1003.4b/D8, p. 59
diff --git a/c/src/exec/posix/src/sched.c b/c/src/exec/posix/src/sched.c
index 4cea4f5a3d..d1e0b9e320 100644
--- a/c/src/exec/posix/src/sched.c
+++ b/c/src/exec/posix/src/sched.c
@@ -10,8 +10,6 @@
#include <rtems/score/thread.h>
#include <rtems/posix/priority.h>
-#ifdef NOT_IMPLEMENTED_YET
-
/*PAGE
*
* 13.3.1 Set Scheduling Parameters, P1003.1b-1993, p. 252
@@ -66,8 +64,6 @@ int sched_getscheduler(
return POSIX_NOT_IMPLEMENTED();
}
-#endif
-
/*PAGE
*
* 13.3.6 Get Scheduling Parameter Limits, P1003.1b-1993, p. 258
diff --git a/c/src/exec/posix/src/time.c b/c/src/exec/posix/src/time.c
index 24642c8757..3ccf36c188 100644
--- a/c/src/exec/posix/src/time.c
+++ b/c/src/exec/posix/src/time.c
@@ -57,7 +57,6 @@ time_t time(
return seconds_since_epoch;
}
-#ifdef NOT_IMPLEMENTED_YET
/*
* 14.2.1 Clocks, P1003.1b-1993, p. 263
*/
@@ -202,5 +201,3 @@ int clock_getenable_attr(
{
return POSIX_NOT_IMPLEMENTED();
}
-
-#endif
diff --git a/c/src/exec/posix/src/types.c b/c/src/exec/posix/src/types.c
index f0e5c47740..81a184c81a 100644
--- a/c/src/exec/posix/src/types.c
+++ b/c/src/exec/posix/src/types.c
@@ -16,24 +16,25 @@
int POSIX_MP_NOT_IMPLEMENTED()
{
assert( 0 );
+ return 0;
}
int POSIX_BOTTOM_REACHED()
{
assert( 0 );
+ return 0;
}
int POSIX_NOT_IMPLEMENTED()
{
assert( 0 );
+ return 0;
}
/*
* END OF TEMPORARY
*/
-#ifdef NOT_IMPLEMENTED_YET
-
/*PAGE
*
* 4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83
@@ -144,7 +145,7 @@ int getgroups(
char *getlogin( void )
{
- return (char *)POSIX_NOT_IMPLEMENTED();
+ return (char *) POSIX_NOT_IMPLEMENTED();
}
/*PAGE
@@ -154,9 +155,12 @@ char *getlogin( void )
* NOTE: P1003.1c/D10, p. 49 adds getlogin_r().
*/
-char *getlogin_r( void )
+int getlogin_r(
+ char *name,
+ size_t namesize
+)
{
- return (char *)POSIX_NOT_IMPLEMENTED();
+ return POSIX_NOT_IMPLEMENTED();
}
/*PAGE
@@ -191,5 +195,3 @@ int setpgid(
{
return POSIX_NOT_IMPLEMENTED();
}
-
-#endif
diff --git a/c/src/exec/posix/src/unistd.c b/c/src/exec/posix/src/unistd.c
index f70d065ce3..1c99fd61b6 100644
--- a/c/src/exec/posix/src/unistd.c
+++ b/c/src/exec/posix/src/unistd.c
@@ -7,8 +7,6 @@
#include <rtems/system.h>
-#ifdef NOT_IMPLEMENTED_YET
-
/*
* 4.8.1 Get Configurable System Variables, P1003.1b-1993, p. 95
*/
@@ -19,5 +17,3 @@ long sysconf(
{
return POSIX_NOT_IMPLEMENTED();
}
-
-#endif
diff --git a/c/src/exec/posix/src/utsname.c b/c/src/exec/posix/src/utsname.c
index dba0fefefb..95ab0e54bb 100644
--- a/c/src/exec/posix/src/utsname.c
+++ b/c/src/exec/posix/src/utsname.c
@@ -45,8 +45,6 @@ int uname(
return 0;
}
-#ifdef NOT_IMPLEMENTED_YET
-
/*PAGE
*
* 4.5.2 Get Process Times, P1003.1b-1993, p. 92
@@ -58,5 +56,3 @@ clock_t times(
{
return POSIX_NOT_IMPLEMENTED();
}
-
-#endif
diff --git a/c/src/lib/libc/utsname.c b/c/src/lib/libc/utsname.c
index dba0fefefb..95ab0e54bb 100644
--- a/c/src/lib/libc/utsname.c
+++ b/c/src/lib/libc/utsname.c
@@ -45,8 +45,6 @@ int uname(
return 0;
}
-#ifdef NOT_IMPLEMENTED_YET
-
/*PAGE
*
* 4.5.2 Get Process Times, P1003.1b-1993, p. 92
@@ -58,5 +56,3 @@ clock_t times(
{
return POSIX_NOT_IMPLEMENTED();
}
-
-#endif