Changeset e180a77e in rtems
- Timestamp:
- 01/04/02 18:28:24 (22 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- b72e368c
- Parents:
- d4651e4
- Files:
-
- 78 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/exec/libcsupport/src/utsname.c
rd4651e4 re180a77e 38 38 39 39 if ( !name ) 40 set_errno_and_return_minus_one( EFAULT );40 rtems_set_errno_and_return_minus_one( EFAULT ); 41 41 42 42 strcpy( name->sysname, "RTEMS" ); -
c/src/exec/posix/src/clockgetres.c
rd4651e4 re180a77e 30 30 { 31 31 if ( !res ) 32 set_errno_and_return_minus_one( EINVAL );32 rtems_set_errno_and_return_minus_one( EINVAL ); 33 33 34 34 switch ( clock_id ) { … … 49 49 50 50 default: 51 set_errno_and_return_minus_one( EINVAL );51 rtems_set_errno_and_return_minus_one( EINVAL ); 52 52 53 53 } -
c/src/exec/posix/src/clockgettime.c
rd4651e4 re180a77e 34 34 35 35 if ( !tp ) 36 set_errno_and_return_minus_one( EINVAL );36 rtems_set_errno_and_return_minus_one( EINVAL ); 37 37 38 38 switch ( clock_id ) { … … 63 63 #endif 64 64 default: 65 set_errno_and_return_minus_one( EINVAL );65 rtems_set_errno_and_return_minus_one( EINVAL ); 66 66 67 67 } -
c/src/exec/posix/src/clocksettime.c
rd4651e4 re180a77e 57 57 58 58 if ( !_TOD_Validate( &tod ) ) 59 set_errno_and_return_minus_one( EINVAL );59 rtems_set_errno_and_return_minus_one( EINVAL ); 60 60 61 61 /* … … 82 82 #endif 83 83 default: 84 set_errno_and_return_minus_one( EINVAL );84 rtems_set_errno_and_return_minus_one( EINVAL ); 85 85 86 86 } -
c/src/exec/posix/src/killinfo.c
rd4651e4 re180a77e 64 64 65 65 if ( pid != getpid() ) 66 set_errno_and_return_minus_one( ESRCH );66 rtems_set_errno_and_return_minus_one( ESRCH ); 67 67 68 68 /* … … 71 71 72 72 if ( sig && !is_valid_signo(sig) ) { 73 set_errno_and_return_minus_one( EINVAL );73 rtems_set_errno_and_return_minus_one( EINVAL ); 74 74 } 75 75 … … 321 321 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); 322 322 if ( !psiginfo ) { 323 set_errno_and_return_minus_one( EAGAIN );323 rtems_set_errno_and_return_minus_one( EAGAIN ); 324 324 } 325 325 -
c/src/exec/posix/src/mqueueclose.c
rd4651e4 re180a77e 48 48 switch ( location ) { 49 49 case OBJECTS_ERROR: 50 set_errno_and_return_minus_one( EBADF );50 rtems_set_errno_and_return_minus_one( EBADF ); 51 51 case OBJECTS_REMOTE: 52 52 _Thread_Dispatch(); 53 53 return POSIX_MP_NOT_IMPLEMENTED(); 54 set_errno_and_return_minus_one( EINVAL );54 rtems_set_errno_and_return_minus_one( EINVAL ); 55 55 case OBJECTS_LOCAL: 56 56 the_mq->open_count -= 1; -
c/src/exec/posix/src/mqueuecreatesupp.c
rd4651e4 re180a77e 68 68 if ( attr_ptr->mq_maxmsg < 0 ){ 69 69 _Thread_Enable_dispatch(); 70 set_errno_and_return_minus_one( EINVAL );70 rtems_set_errno_and_return_minus_one( EINVAL ); 71 71 } 72 72 73 73 if ( attr_ptr->mq_msgsize < 0 ){ 74 74 _Thread_Enable_dispatch(); 75 set_errno_and_return_minus_one( EINVAL );75 rtems_set_errno_and_return_minus_one( EINVAL ); 76 76 } 77 77 … … 85 85 _POSIX_Message_queue_Free( the_mq ); 86 86 _Thread_Enable_dispatch(); 87 set_errno_and_return_minus_one( ENFILE );87 rtems_set_errno_and_return_minus_one( ENFILE ); 88 88 } 89 89 #endif … … 92 92 if ( !the_mq ) { 93 93 _Thread_Enable_dispatch(); 94 set_errno_and_return_minus_one( ENFILE );94 rtems_set_errno_and_return_minus_one( ENFILE ); 95 95 } 96 96 … … 131 131 _POSIX_Message_queue_Free( the_mq ); 132 132 _Thread_Enable_dispatch(); 133 set_errno_and_return_minus_one( ENOSPC );133 rtems_set_errno_and_return_minus_one( ENOSPC ); 134 134 } 135 135 -
c/src/exec/posix/src/mqueuegetattr.c
rd4651e4 re180a77e 48 48 49 49 if ( !mqstat ) 50 set_errno_and_return_minus_one( EINVAL );50 rtems_set_errno_and_return_minus_one( EINVAL ); 51 51 52 52 the_mq = _POSIX_Message_queue_Get( mqdes, &location ); 53 53 switch ( location ) { 54 54 case OBJECTS_ERROR: 55 set_errno_and_return_minus_one( EBADF );55 rtems_set_errno_and_return_minus_one( EBADF ); 56 56 case OBJECTS_REMOTE: 57 57 _Thread_Dispatch(); 58 58 return POSIX_MP_NOT_IMPLEMENTED(); 59 set_errno_and_return_minus_one( EINVAL );59 rtems_set_errno_and_return_minus_one( EINVAL ); 60 60 case OBJECTS_LOCAL: 61 61 /* -
c/src/exec/posix/src/mqueuenotify.c
rd4651e4 re180a77e 71 71 switch ( location ) { 72 72 case OBJECTS_ERROR: 73 set_errno_and_return_minus_one( EBADF );73 rtems_set_errno_and_return_minus_one( EBADF ); 74 74 case OBJECTS_REMOTE: 75 75 _Thread_Dispatch(); 76 76 return POSIX_MP_NOT_IMPLEMENTED(); 77 set_errno_and_return_minus_one( EINVAL );77 rtems_set_errno_and_return_minus_one( EINVAL ); 78 78 case OBJECTS_LOCAL: 79 79 if ( notification ) { 80 80 if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 81 81 _Thread_Enable_dispatch(); 82 set_errno_and_return_minus_one( EBUSY );82 rtems_set_errno_and_return_minus_one( EBUSY ); 83 83 } 84 84 -
c/src/exec/posix/src/mqueueopen.c
rd4651e4 re180a77e 81 81 if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 82 82 _Thread_Enable_dispatch(); 83 set_errno_and_return_minus_one_cast( status, mqd_t );83 rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 84 84 } 85 85 … … 92 92 if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 93 93 _Thread_Enable_dispatch(); 94 set_errno_and_return_minus_one_cast( EEXIST, mqd_t );94 rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 95 95 } 96 96 -
c/src/exec/posix/src/mqueuerecvsupp.c
rd4651e4 re180a77e 56 56 switch ( location ) { 57 57 case OBJECTS_ERROR: 58 set_errno_and_return_minus_one( EBADF );58 rtems_set_errno_and_return_minus_one( EBADF ); 59 59 case OBJECTS_REMOTE: 60 60 _Thread_Dispatch(); 61 61 return POSIX_MP_NOT_IMPLEMENTED(); 62 set_errno_and_return_minus_one( EINVAL );62 rtems_set_errno_and_return_minus_one( EINVAL ); 63 63 case OBJECTS_LOCAL: 64 64 if ( (the_mq->oflag & O_ACCMODE) == O_WRONLY ) { 65 65 _Thread_Enable_dispatch(); 66 set_errno_and_return_minus_one( EBADF );66 rtems_set_errno_and_return_minus_one( EBADF ); 67 67 } 68 68 69 69 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 70 70 _Thread_Enable_dispatch(); 71 set_errno_and_return_minus_one( EMSGSIZE );71 rtems_set_errno_and_return_minus_one( EMSGSIZE ); 72 72 } 73 73 … … 95 95 return length_out; 96 96 97 set_errno_and_return_minus_one(97 rtems_set_errno_and_return_minus_one( 98 98 _POSIX_Message_queue_Translate_core_message_queue_return_code( 99 99 _Thread_Executing->Wait.return_code -
c/src/exec/posix/src/mqueuesendsupp.c
rd4651e4 re180a77e 57 57 58 58 if ( msg_prio > MQ_PRIO_MAX ) 59 set_errno_and_return_minus_one( EINVAL );59 rtems_set_errno_and_return_minus_one( EINVAL ); 60 60 61 61 the_mq = _POSIX_Message_queue_Get( mqdes, &location ); … … 63 63 switch ( location ) { 64 64 case OBJECTS_ERROR: 65 set_errno_and_return_minus_one( EBADF );65 rtems_set_errno_and_return_minus_one( EBADF ); 66 66 67 67 case OBJECTS_REMOTE: 68 68 _Thread_Dispatch(); 69 69 return POSIX_MP_NOT_IMPLEMENTED(); 70 set_errno_and_return_minus_one( EINVAL );70 rtems_set_errno_and_return_minus_one( EINVAL ); 71 71 72 72 case OBJECTS_LOCAL: 73 73 if ( (the_mq->oflag & O_ACCMODE) == O_RDONLY ) { 74 74 _Thread_Enable_dispatch(); 75 set_errno_and_return_minus_one( EBADF );75 rtems_set_errno_and_return_minus_one( EBADF ); 76 76 } 77 77 … … 106 106 return msg_status; 107 107 108 set_errno_and_return_minus_one(108 rtems_set_errno_and_return_minus_one( 109 109 _POSIX_Message_queue_Translate_core_message_queue_return_code( 110 110 msg_status -
c/src/exec/posix/src/mqueuesetattr.c
rd4651e4 re180a77e 50 50 51 51 if ( !mqstat ) 52 set_errno_and_return_minus_one( EINVAL );52 rtems_set_errno_and_return_minus_one( EINVAL ); 53 53 54 54 the_mq = _POSIX_Message_queue_Get( mqdes, &location ); 55 55 switch ( location ) { 56 56 case OBJECTS_ERROR: 57 set_errno_and_return_minus_one( EBADF );57 rtems_set_errno_and_return_minus_one( EBADF ); 58 58 case OBJECTS_REMOTE: 59 59 _Thread_Dispatch(); 60 60 return POSIX_MP_NOT_IMPLEMENTED(); 61 set_errno_and_return_minus_one( EINVAL );61 rtems_set_errno_and_return_minus_one( EINVAL ); 62 62 case OBJECTS_LOCAL: 63 63 -
c/src/exec/posix/src/mqueueunlink.c
rd4651e4 re180a77e 51 51 if ( status != 0 ) { 52 52 _Thread_Enable_dispatch(); 53 set_errno_and_return_minus_one( status );53 rtems_set_errno_and_return_minus_one( status ); 54 54 } 55 55 … … 60 60 if ( !_Objects_Is_local_id(the_mq_id) ) { 61 61 _Thread_Enable_dispatch(); 62 set_errno_and_return_minus_one( ENOSYS );62 rtems_set_errno_and_return_minus_one( ENOSYS ); 63 63 } 64 64 -
c/src/exec/posix/src/nanosleep.c
rd4651e4 re180a77e 33 33 34 34 if ( !rqtp ) 35 set_errno_and_return_minus_one( EINVAL );35 rtems_set_errno_and_return_minus_one( EINVAL ); 36 36 37 37 the_rqtp = (struct timespec *)rqtp; … … 48 48 49 49 if ( /* the_rqtp->tv_sec < 0 || */ the_rqtp->tv_nsec < 0 ) 50 set_errno_and_return_minus_one( EAGAIN );50 rtems_set_errno_and_return_minus_one( EAGAIN ); 51 51 52 52 if ( the_rqtp->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) 53 set_errno_and_return_minus_one( EINVAL );53 rtems_set_errno_and_return_minus_one( EINVAL ); 54 54 55 55 ticks = _POSIX_Timespec_to_interval( the_rqtp ); … … 98 98 99 99 if ( ticks ) 100 set_errno_and_return_minus_one( EINTR );100 rtems_set_errno_and_return_minus_one( EINTR ); 101 101 } 102 102 -
c/src/exec/posix/src/pthreadkill.c
rd4651e4 re180a77e 36 36 37 37 if ( sig && !is_valid_signo(sig) ) 38 set_errno_and_return_minus_one( EINVAL );38 rtems_set_errno_and_return_minus_one( EINVAL ); 39 39 40 40 /* commented out when posix timers added 41 41 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) 42 set_errno_and_return_minus_one( ENOSYS );42 rtems_set_errno_and_return_minus_one( ENOSYS ); 43 43 */ 44 44 … … 47 47 case OBJECTS_ERROR: 48 48 case OBJECTS_REMOTE: 49 set_errno_and_return_minus_one( ESRCH );49 rtems_set_errno_and_return_minus_one( ESRCH ); 50 50 case OBJECTS_LOCAL: 51 51 /* -
c/src/exec/posix/src/pthreadsigmask.c
rd4651e4 re180a77e 36 36 37 37 if ( !set && !oset ) 38 set_errno_and_return_minus_one( EINVAL );38 rtems_set_errno_and_return_minus_one( EINVAL ); 39 39 40 40 api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; … … 57 57 break; 58 58 default: 59 set_errno_and_return_minus_one( EINVAL );59 rtems_set_errno_and_return_minus_one( EINVAL ); 60 60 } 61 61 -
c/src/exec/posix/src/ptimer1.c
rd4651e4 re180a77e 282 282 ( evp->sigev_notify != SIGEV_SIGNAL ) ) { 283 283 /* The value of the field sigev_notify is not valid */ 284 set_errno_and_return_minus_one( EINVAL );284 rtems_set_errno_and_return_minus_one( EINVAL ); 285 285 } 286 286 } … … 307 307 * supports it. It will necessaty to increase the structure used */ 308 308 309 set_errno_and_return_minus_one( EAGAIN );309 rtems_set_errno_and_return_minus_one( EAGAIN ); 310 310 } 311 311 … … 339 339 case RTEMS_INVALID_NAME : /* The assigned name is not valid */ 340 340 341 set_errno_and_return_minus_one( EINVAL );341 rtems_set_errno_and_return_minus_one( EINVAL ); 342 342 343 343 case RTEMS_TOO_MANY : 344 344 345 345 /* There has been created too much timers for the same process */ 346 set_errno_and_return_minus_one( EAGAIN );346 rtems_set_errno_and_return_minus_one( EAGAIN ); 347 347 348 348 default : … … 354 354 */ 355 355 356 set_errno_and_return_minus_one( EINVAL );356 rtems_set_errno_and_return_minus_one( EINVAL ); 357 357 } 358 358 … … 361 361 */ 362 362 363 set_errno_and_return_minus_one( EINVAL );363 rtems_set_errno_and_return_minus_one( EINVAL ); 364 364 } 365 365 … … 392 392 if ( timer_pos == BAD_TIMER_C ) { 393 393 /* The timer identifier is erroneus */ 394 set_errno_and_return_minus_one( EINVAL );394 rtems_set_errno_and_return_minus_one( EINVAL ); 395 395 } 396 396 … … 401 401 if ( status == RTEMS_INVALID_ID ) { 402 402 /* The timer identifier is erroneus */ 403 set_errno_and_return_minus_one( EINVAL );403 rtems_set_errno_and_return_minus_one( EINVAL ); 404 404 } 405 405 … … 438 438 if ( timer_pos == BAD_TIMER_C ) { 439 439 /* The timer identifier is erroneus */ 440 set_errno_and_return_minus_one( EINVAL );440 rtems_set_errno_and_return_minus_one( EINVAL ); 441 441 } 442 442 … … 445 445 error but the variable errno is not actualized */ 446 446 447 set_errno_and_return_minus_one( EINVAL );447 rtems_set_errno_and_return_minus_one( EINVAL ); 448 448 } 449 449 … … 488 488 /* The number of nanoseconds is not correct */ 489 489 490 set_errno_and_return_minus_one( EINVAL );490 rtems_set_errno_and_return_minus_one( EINVAL ); 491 491 } 492 492 … … 611 611 * situation can not occur, but the solution is easy */ 612 612 613 set_errno_and_return_minus_one( EINVAL );613 rtems_set_errno_and_return_minus_one( EINVAL ); 614 614 615 615 break; … … 626 626 */ 627 627 628 set_errno_and_return_minus_one( EINVAL );628 rtems_set_errno_and_return_minus_one( EINVAL ); 629 629 break; 630 630 … … 688 688 if ( timer_pos == BAD_TIMER_C ) { 689 689 /* The timer identifier is erroneus */ 690 set_errno_and_return_minus_one( EINVAL );690 rtems_set_errno_and_return_minus_one( EINVAL ); 691 691 } 692 692 … … 775 775 if ( timer_pos == BAD_TIMER_C ) { 776 776 /* The timer identifier is erroneus */ 777 set_errno_and_return_minus_one( EINVAL );777 rtems_set_errno_and_return_minus_one( EINVAL ); 778 778 } 779 779 -
c/src/exec/posix/src/sched.c
rd4651e4 re180a77e 29 29 ) 30 30 { 31 set_errno_and_return_minus_one( ENOSYS );31 rtems_set_errno_and_return_minus_one( ENOSYS ); 32 32 } 33 33 … … 42 42 ) 43 43 { 44 set_errno_and_return_minus_one( ENOSYS );44 rtems_set_errno_and_return_minus_one( ENOSYS ); 45 45 } 46 46 … … 57 57 ) 58 58 { 59 set_errno_and_return_minus_one( ENOSYS );59 rtems_set_errno_and_return_minus_one( ENOSYS ); 60 60 } 61 61 … … 69 69 ) 70 70 { 71 set_errno_and_return_minus_one( ENOSYS );71 rtems_set_errno_and_return_minus_one( ENOSYS ); 72 72 } 73 73 … … 89 89 90 90 default: 91 set_errno_and_return_minus_one( EINVAL );91 rtems_set_errno_and_return_minus_one( EINVAL ); 92 92 } 93 93 … … 112 112 113 113 default: 114 set_errno_and_return_minus_one( EINVAL );114 rtems_set_errno_and_return_minus_one( EINVAL ); 115 115 } 116 116 … … 135 135 136 136 if ( pid && pid != getpid() ) 137 set_errno_and_return_minus_one( ESRCH );137 rtems_set_errno_and_return_minus_one( ESRCH ); 138 138 139 139 if ( !interval ) 140 set_errno_and_return_minus_one( EINVAL );140 rtems_set_errno_and_return_minus_one( EINVAL ); 141 141 142 142 _POSIX_Interval_to_timespec( _Thread_Ticks_per_timeslice, interval ); -
c/src/exec/posix/src/semaphorecreatesupp.c
rd4651e4 re180a77e 14 14 #include <semaphore.h> 15 15 #include <limits.h> 16 #include <string.h> /* strlen */ 16 17 17 18 #include <rtems/system.h> … … 45 46 if (pshared != 0) { 46 47 _Thread_Enable_dispatch(); 47 set_errno_and_return_minus_one( ENOSYS );48 rtems_set_errno_and_return_minus_one( ENOSYS ); 48 49 } 49 50 … … 51 52 if( strlen(name) > PATH_MAX ) { 52 53 _Thread_Enable_dispatch(); 53 set_errno_and_return_minus_one( ENAMETOOLONG );54 rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 54 55 } 55 56 } … … 59 60 if ( !the_semaphore ) { 60 61 _Thread_Enable_dispatch(); 61 set_errno_and_return_minus_one( ENOSPC );62 rtems_set_errno_and_return_minus_one( ENOSPC ); 62 63 } 63 64 … … 68 69 _POSIX_Semaphore_Free( the_semaphore ); 69 70 _Thread_Enable_dispatch(); 70 set_errno_and_return_minus_one( EAGAIN );71 rtems_set_errno_and_return_minus_one( EAGAIN ); 71 72 } 72 73 #endif -
c/src/exec/posix/src/semaphorewaitsupp.c
rd4651e4 re180a77e 38 38 switch ( location ) { 39 39 case OBJECTS_ERROR: 40 set_errno_and_return_minus_one( EINVAL );40 rtems_set_errno_and_return_minus_one( EINVAL ); 41 41 case OBJECTS_REMOTE: 42 42 _Thread_Dispatch(); 43 set_errno_and_return_minus_one( EINVAL );43 rtems_set_errno_and_return_minus_one( EINVAL ); 44 44 case OBJECTS_LOCAL: 45 45 _CORE_semaphore_Seize( … … 54 54 break; 55 55 case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT: 56 set_errno_and_return_minus_one( EAGAIN );56 rtems_set_errno_and_return_minus_one( EAGAIN ); 57 57 case CORE_SEMAPHORE_WAS_DELETED: 58 set_errno_and_return_minus_one( EAGAIN );58 rtems_set_errno_and_return_minus_one( EAGAIN ); 59 59 case CORE_SEMAPHORE_TIMEOUT: 60 set_errno_and_return_minus_one( ETIMEDOUT );60 rtems_set_errno_and_return_minus_one( ETIMEDOUT ); 61 61 break; 62 62 case CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED: -
c/src/exec/posix/src/semclose.c
rd4651e4 re180a77e 41 41 switch ( location ) { 42 42 case OBJECTS_ERROR: 43 set_errno_and_return_minus_one( EINVAL );43 rtems_set_errno_and_return_minus_one( EINVAL ); 44 44 case OBJECTS_REMOTE: 45 45 _Thread_Dispatch(); 46 46 return POSIX_MP_NOT_IMPLEMENTED(); 47 set_errno_and_return_minus_one( EINVAL );47 rtems_set_errno_and_return_minus_one( EINVAL ); 48 48 case OBJECTS_LOCAL: 49 49 the_semaphore->open_count -= 1; -
c/src/exec/posix/src/semdestroy.c
rd4651e4 re180a77e 36 36 switch ( location ) { 37 37 case OBJECTS_ERROR: 38 set_errno_and_return_minus_one( EINVAL );38 rtems_set_errno_and_return_minus_one( EINVAL ); 39 39 case OBJECTS_REMOTE: 40 40 _Thread_Dispatch(); 41 41 return POSIX_MP_NOT_IMPLEMENTED(); 42 set_errno_and_return_minus_one( EINVAL );42 rtems_set_errno_and_return_minus_one( EINVAL ); 43 43 case OBJECTS_LOCAL: 44 44 /* … … 48 48 if ( the_semaphore->named == TRUE ) { 49 49 _Thread_Enable_dispatch(); 50 set_errno_and_return_minus_one( EINVAL );50 rtems_set_errno_and_return_minus_one( EINVAL ); 51 51 } 52 52 -
c/src/exec/posix/src/semgetvalue.c
rd4651e4 re180a77e 37 37 switch ( location ) { 38 38 case OBJECTS_ERROR: 39 set_errno_and_return_minus_one( EINVAL );39 rtems_set_errno_and_return_minus_one( EINVAL ); 40 40 case OBJECTS_REMOTE: 41 41 _Thread_Dispatch(); 42 42 return POSIX_MP_NOT_IMPLEMENTED(); 43 set_errno_and_return_minus_one( EINVAL );43 rtems_set_errno_and_return_minus_one( EINVAL ); 44 44 case OBJECTS_LOCAL: 45 45 *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); -
c/src/exec/posix/src/seminit.c
rd4651e4 re180a77e 36 36 37 37 if ( !sem ) 38 set_errno_and_return_minus_one( EINVAL );38 rtems_set_errno_and_return_minus_one( EINVAL ); 39 39 40 40 status = _POSIX_Semaphore_Create_support( -
c/src/exec/posix/src/semopen.c
rd4651e4 re180a77e 77 77 if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 78 78 _Thread_Enable_dispatch(); 79 set_errno_and_return_minus_one_cast( status, sem_t * );79 rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 80 80 } 81 81 } else { … … 87 87 if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 88 88 _Thread_Enable_dispatch(); 89 set_errno_and_return_minus_one_cast( EEXIST, sem_t * );89 rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 90 90 } 91 91 -
c/src/exec/posix/src/sempost.c
rd4651e4 re180a77e 36 36 switch ( location ) { 37 37 case OBJECTS_ERROR: 38 set_errno_and_return_minus_one( EINVAL );38 rtems_set_errno_and_return_minus_one( EINVAL ); 39 39 case OBJECTS_REMOTE: 40 40 _Thread_Dispatch(); 41 41 return POSIX_MP_NOT_IMPLEMENTED(); 42 set_errno_and_return_minus_one( EINVAL );42 rtems_set_errno_and_return_minus_one( EINVAL ); 43 43 case OBJECTS_LOCAL: 44 44 _CORE_semaphore_Surrender( -
c/src/exec/posix/src/semunlink.c
rd4651e4 re180a77e 44 44 if ( status != 0 ) { 45 45 _Thread_Enable_dispatch(); 46 set_errno_and_return_minus_one( status );46 rtems_set_errno_and_return_minus_one( status ); 47 47 } 48 48 … … 53 53 if ( !_Objects_Is_local_id(the_semaphore_id) ) { 54 54 _Thread_Enable_dispatch(); 55 set_errno_and_return_minus_one( ENOSYS );55 rtems_set_errno_and_return_minus_one( ENOSYS ); 56 56 } 57 57 -
c/src/exec/posix/src/setpgid.c
rd4651e4 re180a77e 26 26 ) 27 27 { 28 set_errno_and_return_minus_one( ENOSYS );28 rtems_set_errno_and_return_minus_one( ENOSYS ); 29 29 } -
c/src/exec/posix/src/setsid.c
rd4651e4 re180a77e 23 23 pid_t setsid( void ) 24 24 { 25 set_errno_and_return_minus_one( EPERM );25 rtems_set_errno_and_return_minus_one( EPERM ); 26 26 } 27 27 -
c/src/exec/posix/src/sigaction.c
rd4651e4 re180a77e 47 47 48 48 if ( !is_valid_signo(sig) ) 49 set_errno_and_return_minus_one( EINVAL );49 rtems_set_errno_and_return_minus_one( EINVAL ); 50 50 51 51 /* … … 57 57 58 58 if ( sig == SIGKILL ) 59 set_errno_and_return_minus_one( EINVAL );59 rtems_set_errno_and_return_minus_one( EINVAL ); 60 60 61 61 /* -
c/src/exec/posix/src/sigaddset.c
rd4651e4 re180a77e 30 30 { 31 31 if ( !set ) 32 set_errno_and_return_minus_one( EINVAL );32 rtems_set_errno_and_return_minus_one( EINVAL ); 33 33 34 34 if ( !signo ) … … 36 36 37 37 if ( !is_valid_signo(signo) ) 38 set_errno_and_return_minus_one( EINVAL );38 rtems_set_errno_and_return_minus_one( EINVAL ); 39 39 40 40 *set |= signo_to_mask(signo); -
c/src/exec/posix/src/sigdelset.c
rd4651e4 re180a77e 34 34 { 35 35 if ( !set ) 36 set_errno_and_return_minus_one( EINVAL );36 rtems_set_errno_and_return_minus_one( EINVAL ); 37 37 38 38 if ( !signo ) … … 40 40 41 41 if ( !is_valid_signo(signo) ) 42 set_errno_and_return_minus_one( EINVAL );42 rtems_set_errno_and_return_minus_one( EINVAL ); 43 43 44 44 *set &= ~signo_to_mask(signo); -
c/src/exec/posix/src/sigemptyset.c
rd4651e4 re180a77e 29 29 { 30 30 if ( !set ) 31 set_errno_and_return_minus_one( EINVAL );31 rtems_set_errno_and_return_minus_one( EINVAL ); 32 32 33 33 *set = 0; -
c/src/exec/posix/src/sigfillset.c
rd4651e4 re180a77e 29 29 { 30 30 if ( !set ) 31 set_errno_and_return_minus_one( EINVAL );31 rtems_set_errno_and_return_minus_one( EINVAL ); 32 32 33 33 *set = SIGNAL_ALL_MASK; -
c/src/exec/posix/src/sigismember.c
rd4651e4 re180a77e 30 30 { 31 31 if ( !set ) 32 set_errno_and_return_minus_one( EINVAL );32 rtems_set_errno_and_return_minus_one( EINVAL ); 33 33 34 34 if ( !signo ) … … 36 36 37 37 if ( !is_valid_signo(signo) ) 38 set_errno_and_return_minus_one( EINVAL );38 rtems_set_errno_and_return_minus_one( EINVAL ); 39 39 40 40 if ( *set & signo_to_mask(signo) ) -
c/src/exec/posix/src/sigpending.c
rd4651e4 re180a77e 31 31 32 32 if ( !set ) 33 set_errno_and_return_minus_one( EINVAL );33 rtems_set_errno_and_return_minus_one( EINVAL ); 34 34 35 35 api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; -
c/src/exec/posix/src/sigtimedwait.c
rd4651e4 re180a77e 71 71 if ( timeout->tv_nsec < 0 || 72 72 timeout->tv_nsec >= TOD_NANOSECONDS_PER_SECOND) { 73 set_errno_and_return_minus_one( EINVAL );73 rtems_set_errno_and_return_minus_one( EINVAL ); 74 74 } 75 75 -
c/src/exec/posix/src/utsname.c
rd4651e4 re180a77e 38 38 39 39 if ( !name ) 40 set_errno_and_return_minus_one( EFAULT );40 rtems_set_errno_and_return_minus_one( EFAULT ); 41 41 42 42 strcpy( name->sysname, "RTEMS" ); -
c/src/lib/libc/utsname.c
rd4651e4 re180a77e 38 38 39 39 if ( !name ) 40 set_errno_and_return_minus_one( EFAULT );40 rtems_set_errno_and_return_minus_one( EFAULT ); 41 41 42 42 strcpy( name->sysname, "RTEMS" ); -
cpukit/libcsupport/src/utsname.c
rd4651e4 re180a77e 38 38 39 39 if ( !name ) 40 set_errno_and_return_minus_one( EFAULT );40 rtems_set_errno_and_return_minus_one( EFAULT ); 41 41 42 42 strcpy( name->sysname, "RTEMS" ); -
cpukit/posix/src/clockgetres.c
rd4651e4 re180a77e 30 30 { 31 31 if ( !res ) 32 set_errno_and_return_minus_one( EINVAL );32 rtems_set_errno_and_return_minus_one( EINVAL ); 33 33 34 34 switch ( clock_id ) { … … 49 49 50 50 default: 51 set_errno_and_return_minus_one( EINVAL );51 rtems_set_errno_and_return_minus_one( EINVAL ); 52 52 53 53 } -
cpukit/posix/src/clockgettime.c
rd4651e4 re180a77e 34 34 35 35 if ( !tp ) 36 set_errno_and_return_minus_one( EINVAL );36 rtems_set_errno_and_return_minus_one( EINVAL ); 37 37 38 38 switch ( clock_id ) { … … 63 63 #endif 64 64 default: 65 set_errno_and_return_minus_one( EINVAL );65 rtems_set_errno_and_return_minus_one( EINVAL ); 66 66 67 67 } -
cpukit/posix/src/clocksettime.c
rd4651e4 re180a77e 57 57 58 58 if ( !_TOD_Validate( &tod ) ) 59 set_errno_and_return_minus_one( EINVAL );59 rtems_set_errno_and_return_minus_one( EINVAL ); 60 60 61 61 /* … … 82 82 #endif 83 83 default: 84 set_errno_and_return_minus_one( EINVAL );84 rtems_set_errno_and_return_minus_one( EINVAL ); 85 85 86 86 } -
cpukit/posix/src/killinfo.c
rd4651e4 re180a77e 64 64 65 65 if ( pid != getpid() ) 66 set_errno_and_return_minus_one( ESRCH );66 rtems_set_errno_and_return_minus_one( ESRCH ); 67 67 68 68 /* … … 71 71 72 72 if ( sig && !is_valid_signo(sig) ) { 73 set_errno_and_return_minus_one( EINVAL );73 rtems_set_errno_and_return_minus_one( EINVAL ); 74 74 } 75 75 … … 321 321 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); 322 322 if ( !psiginfo ) { 323 set_errno_and_return_minus_one( EAGAIN );323 rtems_set_errno_and_return_minus_one( EAGAIN ); 324 324 } 325 325 -
cpukit/posix/src/mqueueclose.c
rd4651e4 re180a77e 48 48 switch ( location ) { 49 49 case OBJECTS_ERROR: 50 set_errno_and_return_minus_one( EBADF );50 rtems_set_errno_and_return_minus_one( EBADF ); 51 51 case OBJECTS_REMOTE: 52 52 _Thread_Dispatch(); 53 53 return POSIX_MP_NOT_IMPLEMENTED(); 54 set_errno_and_return_minus_one( EINVAL );54 rtems_set_errno_and_return_minus_one( EINVAL ); 55 55 case OBJECTS_LOCAL: 56 56 the_mq->open_count -= 1; -
cpukit/posix/src/mqueuecreatesupp.c
rd4651e4 re180a77e 68 68 if ( attr_ptr->mq_maxmsg < 0 ){ 69 69 _Thread_Enable_dispatch(); 70 set_errno_and_return_minus_one( EINVAL );70 rtems_set_errno_and_return_minus_one( EINVAL ); 71 71 } 72 72 73 73 if ( attr_ptr->mq_msgsize < 0 ){ 74 74 _Thread_Enable_dispatch(); 75 set_errno_and_return_minus_one( EINVAL );75 rtems_set_errno_and_return_minus_one( EINVAL ); 76 76 } 77 77 … … 85 85 _POSIX_Message_queue_Free( the_mq ); 86 86 _Thread_Enable_dispatch(); 87 set_errno_and_return_minus_one( ENFILE );87 rtems_set_errno_and_return_minus_one( ENFILE ); 88 88 } 89 89 #endif … … 92 92 if ( !the_mq ) { 93 93 _Thread_Enable_dispatch(); 94 set_errno_and_return_minus_one( ENFILE );94 rtems_set_errno_and_return_minus_one( ENFILE ); 95 95 } 96 96 … … 131 131 _POSIX_Message_queue_Free( the_mq ); 132 132 _Thread_Enable_dispatch(); 133 set_errno_and_return_minus_one( ENOSPC );133 rtems_set_errno_and_return_minus_one( ENOSPC ); 134 134 } 135 135 -
cpukit/posix/src/mqueuegetattr.c
rd4651e4 re180a77e 48 48 49 49 if ( !mqstat ) 50 set_errno_and_return_minus_one( EINVAL );50 rtems_set_errno_and_return_minus_one( EINVAL ); 51 51 52 52 the_mq = _POSIX_Message_queue_Get( mqdes, &location ); 53 53 switch ( location ) { 54 54 case OBJECTS_ERROR: 55 set_errno_and_return_minus_one( EBADF );55 rtems_set_errno_and_return_minus_one( EBADF ); 56 56 case OBJECTS_REMOTE: 57 57 _Thread_Dispatch(); 58 58 return POSIX_MP_NOT_IMPLEMENTED(); 59 set_errno_and_return_minus_one( EINVAL );59 rtems_set_errno_and_return_minus_one( EINVAL ); 60 60 case OBJECTS_LOCAL: 61 61 /* -
cpukit/posix/src/mqueuenotify.c
rd4651e4 re180a77e 71 71 switch ( location ) { 72 72 case OBJECTS_ERROR: 73 set_errno_and_return_minus_one( EBADF );73 rtems_set_errno_and_return_minus_one( EBADF ); 74 74 case OBJECTS_REMOTE: 75 75 _Thread_Dispatch(); 76 76 return POSIX_MP_NOT_IMPLEMENTED(); 77 set_errno_and_return_minus_one( EINVAL );77 rtems_set_errno_and_return_minus_one( EINVAL ); 78 78 case OBJECTS_LOCAL: 79 79 if ( notification ) { 80 80 if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 81 81 _Thread_Enable_dispatch(); 82 set_errno_and_return_minus_one( EBUSY );82 rtems_set_errno_and_return_minus_one( EBUSY ); 83 83 } 84 84 -
cpukit/posix/src/mqueueopen.c
rd4651e4 re180a77e 81 81 if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 82 82 _Thread_Enable_dispatch(); 83 set_errno_and_return_minus_one_cast( status, mqd_t );83 rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 84 84 } 85 85 … … 92 92 if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 93 93 _Thread_Enable_dispatch(); 94 set_errno_and_return_minus_one_cast( EEXIST, mqd_t );94 rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 95 95 } 96 96 -
cpukit/posix/src/mqueuerecvsupp.c
rd4651e4 re180a77e 56 56 switch ( location ) { 57 57 case OBJECTS_ERROR: 58 set_errno_and_return_minus_one( EBADF );58 rtems_set_errno_and_return_minus_one( EBADF ); 59 59 case OBJECTS_REMOTE: 60 60 _Thread_Dispatch(); 61 61 return POSIX_MP_NOT_IMPLEMENTED(); 62 set_errno_and_return_minus_one( EINVAL );62 rtems_set_errno_and_return_minus_one( EINVAL ); 63 63 case OBJECTS_LOCAL: 64 64 if ( (the_mq->oflag & O_ACCMODE) == O_WRONLY ) { 65 65 _Thread_Enable_dispatch(); 66 set_errno_and_return_minus_one( EBADF );66 rtems_set_errno_and_return_minus_one( EBADF ); 67 67 } 68 68 69 69 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 70 70 _Thread_Enable_dispatch(); 71 set_errno_and_return_minus_one( EMSGSIZE );71 rtems_set_errno_and_return_minus_one( EMSGSIZE ); 72 72 } 73 73 … … 95 95 return length_out; 96 96 97 set_errno_and_return_minus_one(97 rtems_set_errno_and_return_minus_one( 98 98 _POSIX_Message_queue_Translate_core_message_queue_return_code( 99 99 _Thread_Executing->Wait.return_code -
cpukit/posix/src/mqueuesendsupp.c
rd4651e4 re180a77e 57 57 58 58 if ( msg_prio > MQ_PRIO_MAX ) 59 set_errno_and_return_minus_one( EINVAL );59 rtems_set_errno_and_return_minus_one( EINVAL ); 60 60 61 61 the_mq = _POSIX_Message_queue_Get( mqdes, &location ); … … 63 63 switch ( location ) { 64 64 case OBJECTS_ERROR: 65 set_errno_and_return_minus_one( EBADF );65 rtems_set_errno_and_return_minus_one( EBADF ); 66 66 67 67 case OBJECTS_REMOTE: 68 68 _Thread_Dispatch(); 69 69 return POSIX_MP_NOT_IMPLEMENTED(); 70 set_errno_and_return_minus_one( EINVAL );70 rtems_set_errno_and_return_minus_one( EINVAL ); 71 71 72 72 case OBJECTS_LOCAL: 73 73 if ( (the_mq->oflag & O_ACCMODE) == O_RDONLY ) { 74 74 _Thread_Enable_dispatch(); 75 set_errno_and_return_minus_one( EBADF );75 rtems_set_errno_and_return_minus_one( EBADF ); 76 76 } 77 77 … … 106 106 return msg_status; 107 107 108 set_errno_and_return_minus_one(108 rtems_set_errno_and_return_minus_one( 109 109 _POSIX_Message_queue_Translate_core_message_queue_return_code( 110 110 msg_status -
cpukit/posix/src/mqueuesetattr.c
rd4651e4 re180a77e 50 50 51 51 if ( !mqstat ) 52 set_errno_and_return_minus_one( EINVAL );52 rtems_set_errno_and_return_minus_one( EINVAL ); 53 53 54 54 the_mq = _POSIX_Message_queue_Get( mqdes, &location ); 55 55 switch ( location ) { 56 56 case OBJECTS_ERROR: 57 set_errno_and_return_minus_one( EBADF );57 rtems_set_errno_and_return_minus_one( EBADF ); 58 58 case OBJECTS_REMOTE: 59 59 _Thread_Dispatch(); 60 60 return POSIX_MP_NOT_IMPLEMENTED(); 61 set_errno_and_return_minus_one( EINVAL );61 rtems_set_errno_and_return_minus_one( EINVAL ); 62 62 case OBJECTS_LOCAL: 63 63 -
cpukit/posix/src/mqueueunlink.c
rd4651e4 re180a77e 51 51 if ( status != 0 ) { 52 52 _Thread_Enable_dispatch(); 53 set_errno_and_return_minus_one( status );53 rtems_set_errno_and_return_minus_one( status ); 54 54 } 55 55 … … 60 60 if ( !_Objects_Is_local_id(the_mq_id) ) { 61 61 _Thread_Enable_dispatch(); 62 set_errno_and_return_minus_one( ENOSYS );62 rtems_set_errno_and_return_minus_one( ENOSYS ); 63 63 } 64 64 -
cpukit/posix/src/nanosleep.c
rd4651e4 re180a77e 33 33 34 34 if ( !rqtp ) 35 set_errno_and_return_minus_one( EINVAL );35 rtems_set_errno_and_return_minus_one( EINVAL ); 36 36 37 37 the_rqtp = (struct timespec *)rqtp; … … 48 48 49 49 if ( /* the_rqtp->tv_sec < 0 || */ the_rqtp->tv_nsec < 0 ) 50 set_errno_and_return_minus_one( EAGAIN );50 rtems_set_errno_and_return_minus_one( EAGAIN ); 51 51 52 52 if ( the_rqtp->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) 53 set_errno_and_return_minus_one( EINVAL );53 rtems_set_errno_and_return_minus_one( EINVAL ); 54 54 55 55 ticks = _POSIX_Timespec_to_interval( the_rqtp ); … … 98 98 99 99 if ( ticks ) 100 set_errno_and_return_minus_one( EINTR );100 rtems_set_errno_and_return_minus_one( EINTR ); 101 101 } 102 102 -
cpukit/posix/src/pthreadkill.c
rd4651e4 re180a77e 36 36 37 37 if ( sig && !is_valid_signo(sig) ) 38 set_errno_and_return_minus_one( EINVAL );38 rtems_set_errno_and_return_minus_one( EINVAL ); 39 39 40 40 /* commented out when posix timers added 41 41 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) 42 set_errno_and_return_minus_one( ENOSYS );42 rtems_set_errno_and_return_minus_one( ENOSYS ); 43 43 */ 44 44 … … 47 47 case OBJECTS_ERROR: 48 48 case OBJECTS_REMOTE: 49 set_errno_and_return_minus_one( ESRCH );49 rtems_set_errno_and_return_minus_one( ESRCH ); 50 50 case OBJECTS_LOCAL: 51 51 /* -
cpukit/posix/src/pthreadsigmask.c
rd4651e4 re180a77e 36 36 37 37 if ( !set && !oset ) 38 set_errno_and_return_minus_one( EINVAL );38 rtems_set_errno_and_return_minus_one( EINVAL ); 39 39 40 40 api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; … … 57 57 break; 58 58 default: 59 set_errno_and_return_minus_one( EINVAL );59 rtems_set_errno_and_return_minus_one( EINVAL ); 60 60 } 61 61 -
cpukit/posix/src/ptimer1.c
rd4651e4 re180a77e 282 282 ( evp->sigev_notify != SIGEV_SIGNAL ) ) { 283 283 /* The value of the field sigev_notify is not valid */ 284 set_errno_and_return_minus_one( EINVAL );284 rtems_set_errno_and_return_minus_one( EINVAL ); 285 285 } 286 286 } … … 307 307 * supports it. It will necessaty to increase the structure used */ 308 308 309 set_errno_and_return_minus_one( EAGAIN );309 rtems_set_errno_and_return_minus_one( EAGAIN ); 310 310 } 311 311 … … 339 339 case RTEMS_INVALID_NAME : /* The assigned name is not valid */ 340 340 341 set_errno_and_return_minus_one( EINVAL );341 rtems_set_errno_and_return_minus_one( EINVAL ); 342 342 343 343 case RTEMS_TOO_MANY : 344 344 345 345 /* There has been created too much timers for the same process */ 346 set_errno_and_return_minus_one( EAGAIN );346 rtems_set_errno_and_return_minus_one( EAGAIN ); 347 347 348 348 default : … … 354 354 */ 355 355 356 set_errno_and_return_minus_one( EINVAL );356 rtems_set_errno_and_return_minus_one( EINVAL ); 357 357 } 358 358 … … 361 361 */ 362 362 363 set_errno_and_return_minus_one( EINVAL );363 rtems_set_errno_and_return_minus_one( EINVAL ); 364 364 } 365 365 … … 392 392 if ( timer_pos == BAD_TIMER_C ) { 393 393 /* The timer identifier is erroneus */ 394 set_errno_and_return_minus_one( EINVAL );394 rtems_set_errno_and_return_minus_one( EINVAL ); 395 395 } 396 396 … … 401 401 if ( status == RTEMS_INVALID_ID ) { 402 402 /* The timer identifier is erroneus */ 403 set_errno_and_return_minus_one( EINVAL );403 rtems_set_errno_and_return_minus_one( EINVAL ); 404 404 } 405 405 … … 438 438 if ( timer_pos == BAD_TIMER_C ) { 439 439 /* The timer identifier is erroneus */ 440 set_errno_and_return_minus_one( EINVAL );440 rtems_set_errno_and_return_minus_one( EINVAL ); 441 441 } 442 442 … … 445 445 error but the variable errno is not actualized */ 446 446 447 set_errno_and_return_minus_one( EINVAL );447 rtems_set_errno_and_return_minus_one( EINVAL ); 448 448 } 449 449 … … 488 488 /* The number of nanoseconds is not correct */ 489 489 490 set_errno_and_return_minus_one( EINVAL );490 rtems_set_errno_and_return_minus_one( EINVAL ); 491 491 } 492 492 … … 611 611 * situation can not occur, but the solution is easy */ 612 612 613 set_errno_and_return_minus_one( EINVAL );613 rtems_set_errno_and_return_minus_one( EINVAL ); 614 614 615 615 break; … … 626 626 */ 627 627 628 set_errno_and_return_minus_one( EINVAL );628 rtems_set_errno_and_return_minus_one( EINVAL ); 629 629 break; 630 630 … … 688 688 if ( timer_pos == BAD_TIMER_C ) { 689 689 /* The timer identifier is erroneus */ 690 set_errno_and_return_minus_one( EINVAL );690 rtems_set_errno_and_return_minus_one( EINVAL ); 691 691 } 692 692 … … 775 775 if ( timer_pos == BAD_TIMER_C ) { 776 776 /* The timer identifier is erroneus */ 777 set_errno_and_return_minus_one( EINVAL );777 rtems_set_errno_and_return_minus_one( EINVAL ); 778 778 } 779 779 -
cpukit/posix/src/sched.c
rd4651e4 re180a77e 29 29 ) 30 30 { 31 set_errno_and_return_minus_one( ENOSYS );31 rtems_set_errno_and_return_minus_one( ENOSYS ); 32 32 } 33 33 … … 42 42 ) 43 43 { 44 set_errno_and_return_minus_one( ENOSYS );44 rtems_set_errno_and_return_minus_one( ENOSYS ); 45 45 } 46 46 … … 57 57 ) 58 58 { 59 set_errno_and_return_minus_one( ENOSYS );59 rtems_set_errno_and_return_minus_one( ENOSYS ); 60 60 } 61 61 … … 69 69 ) 70 70 { 71 set_errno_and_return_minus_one( ENOSYS );71 rtems_set_errno_and_return_minus_one( ENOSYS ); 72 72 } 73 73 … … 89 89 90 90 default: 91 set_errno_and_return_minus_one( EINVAL );91 rtems_set_errno_and_return_minus_one( EINVAL ); 92 92 } 93 93 … … 112 112 113 113 default: 114 set_errno_and_return_minus_one( EINVAL );114 rtems_set_errno_and_return_minus_one( EINVAL ); 115 115 } 116 116 … … 135 135 136 136 if ( pid && pid != getpid() ) 137 set_errno_and_return_minus_one( ESRCH );137 rtems_set_errno_and_return_minus_one( ESRCH ); 138 138 139 139 if ( !interval ) 140 set_errno_and_return_minus_one( EINVAL );140 rtems_set_errno_and_return_minus_one( EINVAL ); 141 141 142 142 _POSIX_Interval_to_timespec( _Thread_Ticks_per_timeslice, interval ); -
cpukit/posix/src/semaphorecreatesupp.c
rd4651e4 re180a77e 14 14 #include <semaphore.h> 15 15 #include <limits.h> 16 #include <string.h> /* strlen */ 16 17 17 18 #include <rtems/system.h> … … 45 46 if (pshared != 0) { 46 47 _Thread_Enable_dispatch(); 47 set_errno_and_return_minus_one( ENOSYS );48 rtems_set_errno_and_return_minus_one( ENOSYS ); 48 49 } 49 50 … … 51 52 if( strlen(name) > PATH_MAX ) { 52 53 _Thread_Enable_dispatch(); 53 set_errno_and_return_minus_one( ENAMETOOLONG );54 rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 54 55 } 55 56 } … … 59 60 if ( !the_semaphore ) { 60 61 _Thread_Enable_dispatch(); 61 set_errno_and_return_minus_one( ENOSPC );62 rtems_set_errno_and_return_minus_one( ENOSPC ); 62 63 } 63 64 … … 68 69 _POSIX_Semaphore_Free( the_semaphore ); 69 70 _Thread_Enable_dispatch(); 70 set_errno_and_return_minus_one( EAGAIN );71 rtems_set_errno_and_return_minus_one( EAGAIN ); 71 72 } 72 73 #endif -
cpukit/posix/src/semaphorewaitsupp.c
rd4651e4 re180a77e 38 38 switch ( location ) { 39 39 case OBJECTS_ERROR: 40 set_errno_and_return_minus_one( EINVAL );40 rtems_set_errno_and_return_minus_one( EINVAL ); 41 41 case OBJECTS_REMOTE: 42 42 _Thread_Dispatch(); 43 set_errno_and_return_minus_one( EINVAL );43 rtems_set_errno_and_return_minus_one( EINVAL ); 44 44 case OBJECTS_LOCAL: 45 45 _CORE_semaphore_Seize( … … 54 54 break; 55 55 case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT: 56 set_errno_and_return_minus_one( EAGAIN );56 rtems_set_errno_and_return_minus_one( EAGAIN ); 57 57 case CORE_SEMAPHORE_WAS_DELETED: 58 set_errno_and_return_minus_one( EAGAIN );58 rtems_set_errno_and_return_minus_one( EAGAIN ); 59 59 case CORE_SEMAPHORE_TIMEOUT: 60 set_errno_and_return_minus_one( ETIMEDOUT );60 rtems_set_errno_and_return_minus_one( ETIMEDOUT ); 61 61 break; 62 62 case CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED: -
cpukit/posix/src/semclose.c
rd4651e4 re180a77e 41 41 switch ( location ) { 42 42 case OBJECTS_ERROR: 43 set_errno_and_return_minus_one( EINVAL );43 rtems_set_errno_and_return_minus_one( EINVAL ); 44 44 case OBJECTS_REMOTE: 45 45 _Thread_Dispatch(); 46 46 return POSIX_MP_NOT_IMPLEMENTED(); 47 set_errno_and_return_minus_one( EINVAL );47 rtems_set_errno_and_return_minus_one( EINVAL ); 48 48 case OBJECTS_LOCAL: 49 49 the_semaphore->open_count -= 1; -
cpukit/posix/src/semdestroy.c
rd4651e4 re180a77e 36 36 switch ( location ) { 37 37 case OBJECTS_ERROR: 38 set_errno_and_return_minus_one( EINVAL );38 rtems_set_errno_and_return_minus_one( EINVAL ); 39 39 case OBJECTS_REMOTE: 40 40 _Thread_Dispatch(); 41 41 return POSIX_MP_NOT_IMPLEMENTED(); 42 set_errno_and_return_minus_one( EINVAL );42 rtems_set_errno_and_return_minus_one( EINVAL ); 43 43 case OBJECTS_LOCAL: 44 44 /* … … 48 48 if ( the_semaphore->named == TRUE ) { 49 49 _Thread_Enable_dispatch(); 50 set_errno_and_return_minus_one( EINVAL );50 rtems_set_errno_and_return_minus_one( EINVAL ); 51 51 } 52 52 -
cpukit/posix/src/semgetvalue.c
rd4651e4 re180a77e 37 37 switch ( location ) { 38 38 case OBJECTS_ERROR: 39 set_errno_and_return_minus_one( EINVAL );39 rtems_set_errno_and_return_minus_one( EINVAL ); 40 40 case OBJECTS_REMOTE: 41 41 _Thread_Dispatch(); 42 42 return POSIX_MP_NOT_IMPLEMENTED(); 43 set_errno_and_return_minus_one( EINVAL );43 rtems_set_errno_and_return_minus_one( EINVAL ); 44 44 case OBJECTS_LOCAL: 45 45 *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); -
cpukit/posix/src/seminit.c
rd4651e4 re180a77e 36 36 37 37 if ( !sem ) 38 set_errno_and_return_minus_one( EINVAL );38 rtems_set_errno_and_return_minus_one( EINVAL ); 39 39 40 40 status = _POSIX_Semaphore_Create_support( -
cpukit/posix/src/semopen.c
rd4651e4 re180a77e 77 77 if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { 78 78 _Thread_Enable_dispatch(); 79 set_errno_and_return_minus_one_cast( status, sem_t * );79 rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 80 80 } 81 81 } else { … … 87 87 if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 88 88 _Thread_Enable_dispatch(); 89 set_errno_and_return_minus_one_cast( EEXIST, sem_t * );89 rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 90 90 } 91 91 -
cpukit/posix/src/sempost.c
rd4651e4 re180a77e 36 36 switch ( location ) { 37 37 case OBJECTS_ERROR: 38 set_errno_and_return_minus_one( EINVAL );38 rtems_set_errno_and_return_minus_one( EINVAL ); 39 39 case OBJECTS_REMOTE: 40 40 _Thread_Dispatch(); 41 41 return POSIX_MP_NOT_IMPLEMENTED(); 42 set_errno_and_return_minus_one( EINVAL );42 rtems_set_errno_and_return_minus_one( EINVAL ); 43 43 case OBJECTS_LOCAL: 44 44 _CORE_semaphore_Surrender( -
cpukit/posix/src/semunlink.c
rd4651e4 re180a77e 44 44 if ( status != 0 ) { 45 45 _Thread_Enable_dispatch(); 46 set_errno_and_return_minus_one( status );46 rtems_set_errno_and_return_minus_one( status ); 47 47 } 48 48 … … 53 53 if ( !_Objects_Is_local_id(the_semaphore_id) ) { 54 54 _Thread_Enable_dispatch(); 55 set_errno_and_return_minus_one( ENOSYS );55 rtems_set_errno_and_return_minus_one( ENOSYS ); 56 56 } 57 57 -
cpukit/posix/src/setpgid.c
rd4651e4 re180a77e 26 26 ) 27 27 { 28 set_errno_and_return_minus_one( ENOSYS );28 rtems_set_errno_and_return_minus_one( ENOSYS ); 29 29 } -
cpukit/posix/src/setsid.c
rd4651e4 re180a77e 23 23 pid_t setsid( void ) 24 24 { 25 set_errno_and_return_minus_one( EPERM );25 rtems_set_errno_and_return_minus_one( EPERM ); 26 26 } 27 27 -
cpukit/posix/src/sigaction.c
rd4651e4 re180a77e 47 47 48 48 if ( !is_valid_signo(sig) ) 49 set_errno_and_return_minus_one( EINVAL );49 rtems_set_errno_and_return_minus_one( EINVAL ); 50 50 51 51 /* … … 57 57 58 58 if ( sig == SIGKILL ) 59 set_errno_and_return_minus_one( EINVAL );59 rtems_set_errno_and_return_minus_one( EINVAL ); 60 60 61 61 /* -
cpukit/posix/src/sigaddset.c
rd4651e4 re180a77e 30 30 { 31 31 if ( !set ) 32 set_errno_and_return_minus_one( EINVAL );32 rtems_set_errno_and_return_minus_one( EINVAL ); 33 33 34 34 if ( !signo ) … … 36 36 37 37 if ( !is_valid_signo(signo) ) 38 set_errno_and_return_minus_one( EINVAL );38 rtems_set_errno_and_return_minus_one( EINVAL ); 39 39 40 40 *set |= signo_to_mask(signo); -
cpukit/posix/src/sigdelset.c
rd4651e4 re180a77e 34 34 { 35 35 if ( !set ) 36 set_errno_and_return_minus_one( EINVAL );36 rtems_set_errno_and_return_minus_one( EINVAL ); 37 37 38 38 if ( !signo ) … … 40 40 41 41 if ( !is_valid_signo(signo) ) 42 set_errno_and_return_minus_one( EINVAL );42 rtems_set_errno_and_return_minus_one( EINVAL ); 43 43 44 44 *set &= ~signo_to_mask(signo); -
cpukit/posix/src/sigemptyset.c
rd4651e4 re180a77e 29 29 { 30 30 if ( !set ) 31 set_errno_and_return_minus_one( EINVAL );31 rtems_set_errno_and_return_minus_one( EINVAL ); 32 32 33 33 *set = 0; -
cpukit/posix/src/sigfillset.c
rd4651e4 re180a77e 29 29 { 30 30 if ( !set ) 31 set_errno_and_return_minus_one( EINVAL );31 rtems_set_errno_and_return_minus_one( EINVAL ); 32 32 33 33 *set = SIGNAL_ALL_MASK; -
cpukit/posix/src/sigismember.c
rd4651e4 re180a77e 30 30 { 31 31 if ( !set ) 32 set_errno_and_return_minus_one( EINVAL );32 rtems_set_errno_and_return_minus_one( EINVAL ); 33 33 34 34 if ( !signo ) … … 36 36 37 37 if ( !is_valid_signo(signo) ) 38 set_errno_and_return_minus_one( EINVAL );38 rtems_set_errno_and_return_minus_one( EINVAL ); 39 39 40 40 if ( *set & signo_to_mask(signo) ) -
cpukit/posix/src/sigpending.c
rd4651e4 re180a77e 31 31 32 32 if ( !set ) 33 set_errno_and_return_minus_one( EINVAL );33 rtems_set_errno_and_return_minus_one( EINVAL ); 34 34 35 35 api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; -
cpukit/posix/src/sigtimedwait.c
rd4651e4 re180a77e 71 71 if ( timeout->tv_nsec < 0 || 72 72 timeout->tv_nsec >= TOD_NANOSECONDS_PER_SECOND) { 73 set_errno_and_return_minus_one( EINVAL );73 rtems_set_errno_and_return_minus_one( EINVAL ); 74 74 } 75 75
Note: See TracChangeset
for help on using the changeset viewer.