summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-01-04 18:28:24 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-01-04 18:28:24 +0000
commite180a77eddb4a2e4e7fdaf00dae66234d4d309d6 (patch)
treef39e45d67b34fa2d4962e5a9e88216410234c7c4 /cpukit
parentd4651e4104b33dd6683671302524f0bec3bd1cb7 (diff)
downloadrtems-e180a77eddb4a2e4e7fdaf00dae66234d4d309d6.tar.bz2
2002-01-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* src/clockgetres.c: Apply rtems_set_errno_and_return_minus_one. * src/clockgettime.c: Apply rtems_set_errno_and_return_minus_one. * src/clocksettime.c: Apply rtems_set_errno_and_return_minus_one. * src/killinfo.c: Apply rtems_set_errno_and_return_minus_one. * src/mqueueclose.c: Apply rtems_set_errno_and_return_minus_one. * src/mqueuecreatesupp.c: Apply rtems_set_errno_and_return_minus_one. * src/mqueuegetattr.c: Apply rtems_set_errno_and_return_minus_one. * src/mqueuenotify.c: Apply rtems_set_errno_and_return_minus_one. * src/mqueueopen.c: Apply rtems_set_errno_and_return_minus_one. * src/mqueuerecvsupp.c: Apply rtems_set_errno_and_return_minus_one. * src/mqueuesendsupp.c: Apply rtems_set_errno_and_return_minus_one. * src/mqueuesetattr.c: Apply rtems_set_errno_and_return_minus_one. * src/mqueueunlink.c: Apply rtems_set_errno_and_return_minus_one. * src/nanosleep.c: Apply rtems_set_errno_and_return_minus_one. * src/pthreadkill.c: Apply rtems_set_errno_and_return_minus_one. * src/pthreadsigmask.c: Apply rtems_set_errno_and_return_minus_one. * src/ptimer1.c: Apply rtems_set_errno_and_return_minus_one. * src/sched.c: Apply rtems_set_errno_and_return_minus_one. * src/semaphorecreatesupp.c: Apply rtems_set_errno_and_return_minus_one. * src/semaphorewaitsupp.c: Apply rtems_set_errno_and_return_minus_one. * src/semclose.c: Apply rtems_set_errno_and_return_minus_one. * src/semdestroy.c: Apply rtems_set_errno_and_return_minus_one. * src/semgetvalue.c: Apply rtems_set_errno_and_return_minus_one. * src/seminit.c: Apply rtems_set_errno_and_return_minus_one. * src/semopen.c: Apply rtems_set_errno_and_return_minus_one. * src/sempost.c: Apply rtems_set_errno_and_return_minus_one. * src/semunlink.c: Apply rtems_set_errno_and_return_minus_one. * src/setpgid.c: Apply rtems_set_errno_and_return_minus_one. * src/setsid.c: Apply rtems_set_errno_and_return_minus_one. * src/sigaction.c: Apply rtems_set_errno_and_return_minus_one. * src/sigaddset.c: Apply rtems_set_errno_and_return_minus_one. * src/sigdelset.c: Apply rtems_set_errno_and_return_minus_one. * src/sigemptyset.c: Apply rtems_set_errno_and_return_minus_one. * src/sigfillset.c: Apply rtems_set_errno_and_return_minus_one. * src/sigismember.c: Apply rtems_set_errno_and_return_minus_one. * src/sigpending.c: Apply rtems_set_errno_and_return_minus_one. * src/sigtimedwait.c: Apply rtems_set_errno_and_return_minus_one. * src/utsname.c: Apply rtems_set_errno_and_return_minus_one.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libcsupport/src/utsname.c2
-rw-r--r--cpukit/posix/src/clockgetres.c4
-rw-r--r--cpukit/posix/src/clockgettime.c4
-rw-r--r--cpukit/posix/src/clocksettime.c4
-rw-r--r--cpukit/posix/src/killinfo.c6
-rw-r--r--cpukit/posix/src/mqueueclose.c4
-rw-r--r--cpukit/posix/src/mqueuecreatesupp.c10
-rw-r--r--cpukit/posix/src/mqueuegetattr.c6
-rw-r--r--cpukit/posix/src/mqueuenotify.c6
-rw-r--r--cpukit/posix/src/mqueueopen.c4
-rw-r--r--cpukit/posix/src/mqueuerecvsupp.c10
-rw-r--r--cpukit/posix/src/mqueuesendsupp.c10
-rw-r--r--cpukit/posix/src/mqueuesetattr.c6
-rw-r--r--cpukit/posix/src/mqueueunlink.c4
-rw-r--r--cpukit/posix/src/nanosleep.c8
-rw-r--r--cpukit/posix/src/pthreadkill.c6
-rw-r--r--cpukit/posix/src/pthreadsigmask.c4
-rw-r--r--cpukit/posix/src/ptimer1.c30
-rw-r--r--cpukit/posix/src/sched.c16
-rw-r--r--cpukit/posix/src/semaphorecreatesupp.c9
-rw-r--r--cpukit/posix/src/semaphorewaitsupp.c10
-rw-r--r--cpukit/posix/src/semclose.c4
-rw-r--r--cpukit/posix/src/semdestroy.c6
-rw-r--r--cpukit/posix/src/semgetvalue.c4
-rw-r--r--cpukit/posix/src/seminit.c2
-rw-r--r--cpukit/posix/src/semopen.c4
-rw-r--r--cpukit/posix/src/sempost.c4
-rw-r--r--cpukit/posix/src/semunlink.c4
-rw-r--r--cpukit/posix/src/setpgid.c2
-rw-r--r--cpukit/posix/src/setsid.c2
-rw-r--r--cpukit/posix/src/sigaction.c4
-rw-r--r--cpukit/posix/src/sigaddset.c4
-rw-r--r--cpukit/posix/src/sigdelset.c4
-rw-r--r--cpukit/posix/src/sigemptyset.c2
-rw-r--r--cpukit/posix/src/sigfillset.c2
-rw-r--r--cpukit/posix/src/sigismember.c4
-rw-r--r--cpukit/posix/src/sigpending.c2
-rw-r--r--cpukit/posix/src/sigtimedwait.c2
38 files changed, 110 insertions, 109 deletions
diff --git a/cpukit/libcsupport/src/utsname.c b/cpukit/libcsupport/src/utsname.c
index 1bde385550..fe3fecac9f 100644
--- a/cpukit/libcsupport/src/utsname.c
+++ b/cpukit/libcsupport/src/utsname.c
@@ -37,7 +37,7 @@ int uname(
*/
if ( !name )
- set_errno_and_return_minus_one( EFAULT );
+ rtems_set_errno_and_return_minus_one( EFAULT );
strcpy( name->sysname, "RTEMS" );
diff --git a/cpukit/posix/src/clockgetres.c b/cpukit/posix/src/clockgetres.c
index 4b2c8fa6ef..999e4bcb13 100644
--- a/cpukit/posix/src/clockgetres.c
+++ b/cpukit/posix/src/clockgetres.c
@@ -29,7 +29,7 @@ int clock_getres(
)
{
if ( !res )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
switch ( clock_id ) {
@@ -48,7 +48,7 @@ int clock_getres(
break;
default:
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
return 0;
diff --git a/cpukit/posix/src/clockgettime.c b/cpukit/posix/src/clockgettime.c
index e797f71e20..d2b382b54d 100644
--- a/cpukit/posix/src/clockgettime.c
+++ b/cpukit/posix/src/clockgettime.c
@@ -33,7 +33,7 @@ int clock_gettime(
long ticks;
if ( !tp )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
switch ( clock_id ) {
@@ -62,7 +62,7 @@ int clock_gettime(
break;
#endif
default:
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
return 0;
diff --git a/cpukit/posix/src/clocksettime.c b/cpukit/posix/src/clocksettime.c
index 48dc8e114e..a9993182a8 100644
--- a/cpukit/posix/src/clocksettime.c
+++ b/cpukit/posix/src/clocksettime.c
@@ -56,7 +56,7 @@ int clock_settime(
_TOD_Microseconds_per_tick;
if ( !_TOD_Validate( &tod ) )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
/*
* We can't use the tp->tv_sec field because it is based on
@@ -81,7 +81,7 @@ int clock_settime(
break;
#endif
default:
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
return 0;
diff --git a/cpukit/posix/src/killinfo.c b/cpukit/posix/src/killinfo.c
index 7d353597d1..ae6067ab16 100644
--- a/cpukit/posix/src/killinfo.c
+++ b/cpukit/posix/src/killinfo.c
@@ -63,14 +63,14 @@ int killinfo(
*/
if ( pid != getpid() )
- set_errno_and_return_minus_one( ESRCH );
+ rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed if not 0.
*/
if ( sig && !is_valid_signo(sig) ) {
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
/*
@@ -320,7 +320,7 @@ post_process_signal:
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
- set_errno_and_return_minus_one( EAGAIN );
+ rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
diff --git a/cpukit/posix/src/mqueueclose.c b/cpukit/posix/src/mqueueclose.c
index b0c1930bfa..80da647116 100644
--- a/cpukit/posix/src/mqueueclose.c
+++ b/cpukit/posix/src/mqueueclose.c
@@ -47,11 +47,11 @@ int mq_close(
the_mq = _POSIX_Message_queue_Get( mqdes, &location );
switch ( location ) {
case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EBADF );
+ rtems_set_errno_and_return_minus_one( EBADF );
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_LOCAL:
the_mq->open_count -= 1;
_POSIX_Message_queue_Delete( the_mq );
diff --git a/cpukit/posix/src/mqueuecreatesupp.c b/cpukit/posix/src/mqueuecreatesupp.c
index 36d638299a..ce9a4bcb29 100644
--- a/cpukit/posix/src/mqueuecreatesupp.c
+++ b/cpukit/posix/src/mqueuecreatesupp.c
@@ -67,12 +67,12 @@ int _POSIX_Message_queue_Create_support(
} else {
if ( attr_ptr->mq_maxmsg < 0 ){
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize < 0 ){
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
attr = *attr_ptr;
@@ -84,14 +84,14 @@ int _POSIX_Message_queue_Create_support(
the_mq->Object.id, FALSE ) ) ) {
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( ENFILE );
+ rtems_set_errno_and_return_minus_one( ENFILE );
}
#endif
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( ENFILE );
+ rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
@@ -130,7 +130,7 @@ int _POSIX_Message_queue_Create_support(
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( ENOSPC );
+ rtems_set_errno_and_return_minus_one( ENOSPC );
}
_Objects_Open(
diff --git a/cpukit/posix/src/mqueuegetattr.c b/cpukit/posix/src/mqueuegetattr.c
index 3eb5236b55..3152611300 100644
--- a/cpukit/posix/src/mqueuegetattr.c
+++ b/cpukit/posix/src/mqueuegetattr.c
@@ -47,16 +47,16 @@ int mq_getattr(
CORE_message_queue_Attributes *the_mq_attr;
if ( !mqstat )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
the_mq = _POSIX_Message_queue_Get( mqdes, &location );
switch ( location ) {
case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EBADF );
+ rtems_set_errno_and_return_minus_one( EBADF );
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_LOCAL:
/*
* Return the old values.
diff --git a/cpukit/posix/src/mqueuenotify.c b/cpukit/posix/src/mqueuenotify.c
index 612d3760f1..35a1e1deca 100644
--- a/cpukit/posix/src/mqueuenotify.c
+++ b/cpukit/posix/src/mqueuenotify.c
@@ -70,16 +70,16 @@ int mq_notify(
the_mq = _POSIX_Message_queue_Get( mqdes, &location );
switch ( location ) {
case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EBADF );
+ rtems_set_errno_and_return_minus_one( EBADF );
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_LOCAL:
if ( notification ) {
if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( EBUSY );
+ rtems_set_errno_and_return_minus_one( EBUSY );
}
_CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL );
diff --git a/cpukit/posix/src/mqueueopen.c b/cpukit/posix/src/mqueueopen.c
index dc0bf9b592..0cad4974f6 100644
--- a/cpukit/posix/src/mqueueopen.c
+++ b/cpukit/posix/src/mqueueopen.c
@@ -80,7 +80,7 @@ mqd_t mq_open(
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one_cast( status, mqd_t );
+ rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
}
} else { /* name -> ID translation succeeded */
@@ -91,7 +91,7 @@ mqd_t mq_open(
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
+ rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
}
/*
diff --git a/cpukit/posix/src/mqueuerecvsupp.c b/cpukit/posix/src/mqueuerecvsupp.c
index 244487934f..8c12a2ef53 100644
--- a/cpukit/posix/src/mqueuerecvsupp.c
+++ b/cpukit/posix/src/mqueuerecvsupp.c
@@ -55,20 +55,20 @@ ssize_t _POSIX_Message_queue_Receive_support(
the_mq = _POSIX_Message_queue_Get( mqdes, &location );
switch ( location ) {
case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EBADF );
+ rtems_set_errno_and_return_minus_one( EBADF );
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_LOCAL:
if ( (the_mq->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( EBADF );
+ rtems_set_errno_and_return_minus_one( EBADF );
}
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( EMSGSIZE );
+ rtems_set_errno_and_return_minus_one( EMSGSIZE );
}
/*
@@ -94,7 +94,7 @@ ssize_t _POSIX_Message_queue_Receive_support(
if ( !_Thread_Executing->Wait.return_code )
return length_out;
- set_errno_and_return_minus_one(
+ rtems_set_errno_and_return_minus_one(
_POSIX_Message_queue_Translate_core_message_queue_return_code(
_Thread_Executing->Wait.return_code
)
diff --git a/cpukit/posix/src/mqueuesendsupp.c b/cpukit/posix/src/mqueuesendsupp.c
index c698cde44c..c7e6c50764 100644
--- a/cpukit/posix/src/mqueuesendsupp.c
+++ b/cpukit/posix/src/mqueuesendsupp.c
@@ -56,23 +56,23 @@ int _POSIX_Message_queue_Send_support(
*/
if ( msg_prio > MQ_PRIO_MAX )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
the_mq = _POSIX_Message_queue_Get( mqdes, &location );
switch ( location ) {
case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EBADF );
+ rtems_set_errno_and_return_minus_one( EBADF );
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_LOCAL:
if ( (the_mq->oflag & O_ACCMODE) == O_RDONLY ) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( EBADF );
+ rtems_set_errno_and_return_minus_one( EBADF );
}
msg_status = _CORE_message_queue_Submit(
@@ -105,7 +105,7 @@ int _POSIX_Message_queue_Send_support(
if ( !msg_status )
return msg_status;
- set_errno_and_return_minus_one(
+ rtems_set_errno_and_return_minus_one(
_POSIX_Message_queue_Translate_core_message_queue_return_code(
msg_status
)
diff --git a/cpukit/posix/src/mqueuesetattr.c b/cpukit/posix/src/mqueuesetattr.c
index 217d8d54f2..142b7ad15e 100644
--- a/cpukit/posix/src/mqueuesetattr.c
+++ b/cpukit/posix/src/mqueuesetattr.c
@@ -49,16 +49,16 @@ int mq_setattr(
CORE_message_queue_Attributes *the_mq_attr;
if ( !mqstat )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
the_mq = _POSIX_Message_queue_Get( mqdes, &location );
switch ( location ) {
case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EBADF );
+ rtems_set_errno_and_return_minus_one( EBADF );
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_LOCAL:
the_core_mq = &the_mq->Message_queue;
diff --git a/cpukit/posix/src/mqueueunlink.c b/cpukit/posix/src/mqueueunlink.c
index ac0cc92faf..5d3f54db8d 100644
--- a/cpukit/posix/src/mqueueunlink.c
+++ b/cpukit/posix/src/mqueueunlink.c
@@ -50,7 +50,7 @@ int mq_unlink(
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
if ( status != 0 ) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( status );
+ rtems_set_errno_and_return_minus_one( status );
}
/*
@@ -59,7 +59,7 @@ int mq_unlink(
if ( !_Objects_Is_local_id(the_mq_id) ) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( ENOSYS );
+ rtems_set_errno_and_return_minus_one( ENOSYS );
}
the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object(
diff --git a/cpukit/posix/src/nanosleep.c b/cpukit/posix/src/nanosleep.c
index de2df3c98f..24f9dd6969 100644
--- a/cpukit/posix/src/nanosleep.c
+++ b/cpukit/posix/src/nanosleep.c
@@ -32,7 +32,7 @@ int nanosleep(
struct timespec *the_rqtp;
if ( !rqtp )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
the_rqtp = (struct timespec *)rqtp;
@@ -47,10 +47,10 @@ int nanosleep(
the_rqtp->tv_sec = 0;
if ( /* the_rqtp->tv_sec < 0 || */ the_rqtp->tv_nsec < 0 )
- set_errno_and_return_minus_one( EAGAIN );
+ rtems_set_errno_and_return_minus_one( EAGAIN );
if ( the_rqtp->tv_nsec >= TOD_NANOSECONDS_PER_SECOND )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
ticks = _POSIX_Timespec_to_interval( the_rqtp );
@@ -97,7 +97,7 @@ int nanosleep(
*/
if ( ticks )
- set_errno_and_return_minus_one( EINTR );
+ rtems_set_errno_and_return_minus_one( EINTR );
}
return 0;
diff --git a/cpukit/posix/src/pthreadkill.c b/cpukit/posix/src/pthreadkill.c
index 1ce56b273d..fbc282b970 100644
--- a/cpukit/posix/src/pthreadkill.c
+++ b/cpukit/posix/src/pthreadkill.c
@@ -35,18 +35,18 @@ int pthread_kill(
Objects_Locations location;
if ( sig && !is_valid_signo(sig) )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
/* commented out when posix timers added
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO )
- set_errno_and_return_minus_one( ENOSYS );
+ rtems_set_errno_and_return_minus_one( ENOSYS );
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
case OBJECTS_ERROR:
case OBJECTS_REMOTE:
- set_errno_and_return_minus_one( ESRCH );
+ rtems_set_errno_and_return_minus_one( ESRCH );
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
diff --git a/cpukit/posix/src/pthreadsigmask.c b/cpukit/posix/src/pthreadsigmask.c
index 618061ee16..e24f301ab1 100644
--- a/cpukit/posix/src/pthreadsigmask.c
+++ b/cpukit/posix/src/pthreadsigmask.c
@@ -35,7 +35,7 @@ int pthread_sigmask(
POSIX_API_Control *api;
if ( !set && !oset )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
@@ -56,7 +56,7 @@ int pthread_sigmask(
api->signals_blocked = *set;
break;
default:
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
/* XXX are there critical section problems here? */
diff --git a/cpukit/posix/src/ptimer1.c b/cpukit/posix/src/ptimer1.c
index 08eb003b03..820f61f1a4 100644
--- a/cpukit/posix/src/ptimer1.c
+++ b/cpukit/posix/src/ptimer1.c
@@ -281,7 +281,7 @@ int timer_create(
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
( evp->sigev_notify != SIGEV_SIGNAL ) ) {
/* The value of the field sigev_notify is not valid */
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
}
@@ -306,7 +306,7 @@ int timer_create(
/* There is not position for another timers in spite of RTEMS
* supports it. It will necessaty to increase the structure used */
- set_errno_and_return_minus_one( EAGAIN );
+ rtems_set_errno_and_return_minus_one( EAGAIN );
}
/* Exit parameter */
@@ -338,12 +338,12 @@ int timer_create(
case RTEMS_INVALID_NAME : /* The assigned name is not valid */
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case RTEMS_TOO_MANY :
/* There has been created too much timers for the same process */
- set_errno_and_return_minus_one( EAGAIN );
+ rtems_set_errno_and_return_minus_one( EAGAIN );
default :
@@ -353,14 +353,14 @@ int timer_create(
* rtems_timer_create can not return other different value.
*/
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
/*
* The next sentence is used to avoid singular situations
*/
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
/*
@@ -391,7 +391,7 @@ int timer_delete(
if ( timer_pos == BAD_TIMER_C ) {
/* The timer identifier is erroneus */
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
/* The timer is deleted */
@@ -400,7 +400,7 @@ int timer_delete(
if ( status == RTEMS_INVALID_ID ) {
/* The timer identifier is erroneus */
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
/* Initializes the data of the timer */
@@ -437,14 +437,14 @@ int timer_settime(
if ( timer_pos == BAD_TIMER_C ) {
/* The timer identifier is erroneus */
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( value == NULL ) {
/* The stucture of times of the timer is free, and then returns an
error but the variable errno is not actualized */
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
/* If the function reaches this point, then it will be necessary to do
@@ -487,7 +487,7 @@ int timer_settime(
( value->it_value.tv_nsec < MIN_NSEC_C ) ) {
/* The number of nanoseconds is not correct */
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
/* Then, "value" must be converted from seconds and nanoseconds to clock
@@ -610,7 +610,7 @@ int timer_settime(
/* The timer identifier is not correct. In theory, this
* situation can not occur, but the solution is easy */
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
break;
@@ -625,7 +625,7 @@ int timer_settime(
* errno = EINVAL;
*/
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
break;
default: break;
@@ -687,7 +687,7 @@ int timer_gettime(
if ( timer_pos == BAD_TIMER_C ) {
/* The timer identifier is erroneus */
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
/* Calculates the difference between the start time of the timer and
@@ -774,7 +774,7 @@ int timer_getoverrun(
if ( timer_pos == BAD_TIMER_C ) {
/* The timer identifier is erroneus */
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
/* The overflow count of the timer is stored in "overrun" */
diff --git a/cpukit/posix/src/sched.c b/cpukit/posix/src/sched.c
index 767a9e270b..a0eb62acdd 100644
--- a/cpukit/posix/src/sched.c
+++ b/cpukit/posix/src/sched.c
@@ -28,7 +28,7 @@ int sched_setparam(
const struct sched_param *param
)
{
- set_errno_and_return_minus_one( ENOSYS );
+ rtems_set_errno_and_return_minus_one( ENOSYS );
}
/*PAGE
@@ -41,7 +41,7 @@ int sched_getparam(
const struct sched_param *param
)
{
- set_errno_and_return_minus_one( ENOSYS );
+ rtems_set_errno_and_return_minus_one( ENOSYS );
}
/*PAGE
@@ -56,7 +56,7 @@ int sched_setscheduler(
const struct sched_param *param
)
{
- set_errno_and_return_minus_one( ENOSYS );
+ rtems_set_errno_and_return_minus_one( ENOSYS );
}
/*PAGE
@@ -68,7 +68,7 @@ int sched_getscheduler(
pid_t pid
)
{
- set_errno_and_return_minus_one( ENOSYS );
+ rtems_set_errno_and_return_minus_one( ENOSYS );
}
/*PAGE
@@ -88,7 +88,7 @@ int sched_get_priority_max(
break;
default:
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
@@ -111,7 +111,7 @@ int sched_get_priority_min(
break;
default:
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
@@ -134,10 +134,10 @@ int sched_rr_get_interval(
*/
if ( pid && pid != getpid() )
- set_errno_and_return_minus_one( ESRCH );
+ rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
_POSIX_Interval_to_timespec( _Thread_Ticks_per_timeslice, interval );
return 0;
diff --git a/cpukit/posix/src/semaphorecreatesupp.c b/cpukit/posix/src/semaphorecreatesupp.c
index aa04d95999..e45d4d808a 100644
--- a/cpukit/posix/src/semaphorecreatesupp.c
+++ b/cpukit/posix/src/semaphorecreatesupp.c
@@ -13,6 +13,7 @@
#include <pthread.h>
#include <semaphore.h>
#include <limits.h>
+#include <string.h> /* strlen */
#include <rtems/system.h>
#include <rtems/score/object.h>
@@ -44,13 +45,13 @@ int _POSIX_Semaphore_Create_support(
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( ENOSYS );
+ rtems_set_errno_and_return_minus_one( ENOSYS );
}
if ( name ) {
if( strlen(name) > PATH_MAX ) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( ENAMETOOLONG );
+ rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
}
}
@@ -58,7 +59,7 @@ int _POSIX_Semaphore_Create_support(
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( ENOSPC );
+ rtems_set_errno_and_return_minus_one( ENOSPC );
}
#if defined(RTEMS_MULTIPROCESSING)
@@ -67,7 +68,7 @@ int _POSIX_Semaphore_Create_support(
the_semaphore->Object.id, FALSE ) ) ) {
_POSIX_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( EAGAIN );
+ rtems_set_errno_and_return_minus_one( EAGAIN );
}
#endif
diff --git a/cpukit/posix/src/semaphorewaitsupp.c b/cpukit/posix/src/semaphorewaitsupp.c
index a3c9315cd7..d3fd9787ce 100644
--- a/cpukit/posix/src/semaphorewaitsupp.c
+++ b/cpukit/posix/src/semaphorewaitsupp.c
@@ -37,10 +37,10 @@ int _POSIX_Semaphore_Wait_support(
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_REMOTE:
_Thread_Dispatch();
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_LOCAL:
_CORE_semaphore_Seize(
&the_semaphore->Semaphore,
@@ -53,11 +53,11 @@ int _POSIX_Semaphore_Wait_support(
case CORE_SEMAPHORE_STATUS_SUCCESSFUL:
break;
case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT:
- set_errno_and_return_minus_one( EAGAIN );
+ rtems_set_errno_and_return_minus_one( EAGAIN );
case CORE_SEMAPHORE_WAS_DELETED:
- set_errno_and_return_minus_one( EAGAIN );
+ rtems_set_errno_and_return_minus_one( EAGAIN );
case CORE_SEMAPHORE_TIMEOUT:
- set_errno_and_return_minus_one( ETIMEDOUT );
+ rtems_set_errno_and_return_minus_one( ETIMEDOUT );
break;
case CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED:
/*
diff --git a/cpukit/posix/src/semclose.c b/cpukit/posix/src/semclose.c
index 3336570b32..a0e786ba27 100644
--- a/cpukit/posix/src/semclose.c
+++ b/cpukit/posix/src/semclose.c
@@ -40,11 +40,11 @@ int sem_close(
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_LOCAL:
the_semaphore->open_count -= 1;
_POSIX_Semaphore_Delete( the_semaphore );
diff --git a/cpukit/posix/src/semdestroy.c b/cpukit/posix/src/semdestroy.c
index dd40eef673..01ea1606e0 100644
--- a/cpukit/posix/src/semdestroy.c
+++ b/cpukit/posix/src/semdestroy.c
@@ -35,11 +35,11 @@ int sem_destroy(
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_LOCAL:
/*
* Undefined operation on a named semaphore.
@@ -47,7 +47,7 @@ int sem_destroy(
if ( the_semaphore->named == TRUE ) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
_POSIX_Semaphore_Delete( the_semaphore );
diff --git a/cpukit/posix/src/semgetvalue.c b/cpukit/posix/src/semgetvalue.c
index 6f27b5e2c7..71a99df73e 100644
--- a/cpukit/posix/src/semgetvalue.c
+++ b/cpukit/posix/src/semgetvalue.c
@@ -36,11 +36,11 @@ int sem_getvalue(
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_LOCAL:
*sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore );
_Thread_Enable_dispatch();
diff --git a/cpukit/posix/src/seminit.c b/cpukit/posix/src/seminit.c
index 5b8b8f177f..0635ebea0f 100644
--- a/cpukit/posix/src/seminit.c
+++ b/cpukit/posix/src/seminit.c
@@ -35,7 +35,7 @@ int sem_init(
POSIX_Semaphore_Control *the_semaphore;
if ( !sem )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
status = _POSIX_Semaphore_Create_support(
NULL,
diff --git a/cpukit/posix/src/semopen.c b/cpukit/posix/src/semopen.c
index ca2f79fe67..d956f9a86b 100644
--- a/cpukit/posix/src/semopen.c
+++ b/cpukit/posix/src/semopen.c
@@ -76,7 +76,7 @@ sem_t *sem_open(
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one_cast( status, sem_t * );
+ rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
}
} else {
@@ -86,7 +86,7 @@ sem_t *sem_open(
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
+ rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
diff --git a/cpukit/posix/src/sempost.c b/cpukit/posix/src/sempost.c
index 50c4eefdd8..187e511253 100644
--- a/cpukit/posix/src/sempost.c
+++ b/cpukit/posix/src/sempost.c
@@ -35,11 +35,11 @@ int sem_post(
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_ERROR:
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_LOCAL:
_CORE_semaphore_Surrender(
&the_semaphore->Semaphore,
diff --git a/cpukit/posix/src/semunlink.c b/cpukit/posix/src/semunlink.c
index 96b6f926d3..29912d4281 100644
--- a/cpukit/posix/src/semunlink.c
+++ b/cpukit/posix/src/semunlink.c
@@ -43,7 +43,7 @@ int sem_unlink(
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
if ( status != 0 ) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( status );
+ rtems_set_errno_and_return_minus_one( status );
}
/*
@@ -52,7 +52,7 @@ int sem_unlink(
if ( !_Objects_Is_local_id(the_semaphore_id) ) {
_Thread_Enable_dispatch();
- set_errno_and_return_minus_one( ENOSYS );
+ rtems_set_errno_and_return_minus_one( ENOSYS );
}
the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object(
diff --git a/cpukit/posix/src/setpgid.c b/cpukit/posix/src/setpgid.c
index 85b2420507..26786cc552 100644
--- a/cpukit/posix/src/setpgid.c
+++ b/cpukit/posix/src/setpgid.c
@@ -25,5 +25,5 @@ int setpgid(
pid_t pgid
)
{
- set_errno_and_return_minus_one( ENOSYS );
+ rtems_set_errno_and_return_minus_one( ENOSYS );
}
diff --git a/cpukit/posix/src/setsid.c b/cpukit/posix/src/setsid.c
index 9ec90a5f32..81a60a798d 100644
--- a/cpukit/posix/src/setsid.c
+++ b/cpukit/posix/src/setsid.c
@@ -22,7 +22,7 @@
pid_t setsid( void )
{
- set_errno_and_return_minus_one( EPERM );
+ rtems_set_errno_and_return_minus_one( EPERM );
}
diff --git a/cpukit/posix/src/sigaction.c b/cpukit/posix/src/sigaction.c
index 704eaef7ef..708d1ac0b4 100644
--- a/cpukit/posix/src/sigaction.c
+++ b/cpukit/posix/src/sigaction.c
@@ -46,7 +46,7 @@ int sigaction(
return 0;
if ( !is_valid_signo(sig) )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Some signals cannot be ignored (P1003.1b-1993, pp. 70-72 and references.
@@ -56,7 +56,7 @@ int sigaction(
*/
if ( sig == SIGKILL )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Evaluate the new action structure and set the global signal vector
diff --git a/cpukit/posix/src/sigaddset.c b/cpukit/posix/src/sigaddset.c
index 9967af30ae..864e314940 100644
--- a/cpukit/posix/src/sigaddset.c
+++ b/cpukit/posix/src/sigaddset.c
@@ -29,13 +29,13 @@ int sigaddset(
)
{
if ( !set )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
return 0;
if ( !is_valid_signo(signo) )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
*set |= signo_to_mask(signo);
return 0;
diff --git a/cpukit/posix/src/sigdelset.c b/cpukit/posix/src/sigdelset.c
index e326a8165d..bf914935ec 100644
--- a/cpukit/posix/src/sigdelset.c
+++ b/cpukit/posix/src/sigdelset.c
@@ -33,13 +33,13 @@ int sigdelset(
)
{
if ( !set )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
return 0;
if ( !is_valid_signo(signo) )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
*set &= ~signo_to_mask(signo);
return 0;
diff --git a/cpukit/posix/src/sigemptyset.c b/cpukit/posix/src/sigemptyset.c
index 8af32ee901..5f606a6409 100644
--- a/cpukit/posix/src/sigemptyset.c
+++ b/cpukit/posix/src/sigemptyset.c
@@ -28,7 +28,7 @@ int sigemptyset(
)
{
if ( !set )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
*set = 0;
return 0;
diff --git a/cpukit/posix/src/sigfillset.c b/cpukit/posix/src/sigfillset.c
index df0450f695..89a98d2066 100644
--- a/cpukit/posix/src/sigfillset.c
+++ b/cpukit/posix/src/sigfillset.c
@@ -28,7 +28,7 @@ int sigfillset(
)
{
if ( !set )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
*set = SIGNAL_ALL_MASK;
return 0;
diff --git a/cpukit/posix/src/sigismember.c b/cpukit/posix/src/sigismember.c
index 1ae94e350b..64ace130a7 100644
--- a/cpukit/posix/src/sigismember.c
+++ b/cpukit/posix/src/sigismember.c
@@ -29,13 +29,13 @@ int sigismember(
)
{
if ( !set )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
return 0;
if ( !is_valid_signo(signo) )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
if ( *set & signo_to_mask(signo) )
return 1;
diff --git a/cpukit/posix/src/sigpending.c b/cpukit/posix/src/sigpending.c
index 602278157f..3ca22341a3 100644
--- a/cpukit/posix/src/sigpending.c
+++ b/cpukit/posix/src/sigpending.c
@@ -30,7 +30,7 @@ int sigpending(
POSIX_API_Control *api;
if ( !set )
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
diff --git a/cpukit/posix/src/sigtimedwait.c b/cpukit/posix/src/sigtimedwait.c
index 8f361e4079..917b6a14ff 100644
--- a/cpukit/posix/src/sigtimedwait.c
+++ b/cpukit/posix/src/sigtimedwait.c
@@ -70,7 +70,7 @@ int sigtimedwait(
if ( timeout->tv_nsec < 0 ||
timeout->tv_nsec >= TOD_NANOSECONDS_PER_SECOND) {
- set_errno_and_return_minus_one( EINVAL );
+ rtems_set_errno_and_return_minus_one( EINVAL );
}
interval = _POSIX_Timespec_to_interval( timeout );