From b57a6a711adb5f6afe6aee57ecc211fd746ea5ab Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 11 Feb 2015 13:59:29 -0600 Subject: psxhdrs: Reorganize into subdirectories per .h file and rename files This is a better organization and makes it clearer which file is testing which method from which header file. --- testsuites/psxtests/psxhdrs/Makefile.am | 158 ++++++++++++++++++--- testsuites/psxtests/psxhdrs/clock01.c | 34 ----- testsuites/psxtests/psxhdrs/clock02.c | 34 ----- testsuites/psxtests/psxhdrs/clock03.c | 34 ----- testsuites/psxtests/psxhdrs/clock04.c | 34 ----- testsuites/psxtests/psxhdrs/clock05.c | 40 ------ testsuites/psxtests/psxhdrs/clock06.c | 37 ----- testsuites/psxtests/psxhdrs/cond01.c | 33 ----- testsuites/psxtests/psxhdrs/cond02.c | 33 ----- testsuites/psxtests/psxhdrs/cond03.c | 34 ----- testsuites/psxtests/psxhdrs/cond04.c | 33 ----- testsuites/psxtests/psxhdrs/cond05.c | 33 ----- testsuites/psxtests/psxhdrs/cond06.c | 34 ----- testsuites/psxtests/psxhdrs/cond07.c | 35 ----- testsuites/psxtests/psxhdrs/cond08.c | 37 ----- testsuites/psxtests/psxhdrs/cond09.c | 40 ------ testsuites/psxtests/psxhdrs/cond10.c | 33 ----- testsuites/psxtests/psxhdrs/key01.c | 40 ------ testsuites/psxtests/psxhdrs/key02.c | 37 ----- testsuites/psxtests/psxhdrs/key03.c | 35 ----- testsuites/psxtests/psxhdrs/key04.c | 33 ----- testsuites/psxtests/psxhdrs/mutex01.c | 33 ----- testsuites/psxtests/psxhdrs/mutex02.c | 33 ----- testsuites/psxtests/psxhdrs/mutex03.c | 34 ----- testsuites/psxtests/psxhdrs/mutex04.c | 33 ----- testsuites/psxtests/psxhdrs/mutex05.c | 33 ----- testsuites/psxtests/psxhdrs/mutex06.c | 33 ----- testsuites/psxtests/psxhdrs/mutex07.c | 41 ------ testsuites/psxtests/psxhdrs/mutex08.c | 37 ----- testsuites/psxtests/psxhdrs/mutex09.c | 37 ----- testsuites/psxtests/psxhdrs/mutex10.c | 37 ----- testsuites/psxtests/psxhdrs/mutex11.c | 40 ------ testsuites/psxtests/psxhdrs/mutex12.c | 33 ----- testsuites/psxtests/psxhdrs/mutex13.c | 37 ----- testsuites/psxtests/psxhdrs/mutex14.c | 37 ----- testsuites/psxtests/psxhdrs/mutex15.c | 37 ----- testsuites/psxtests/psxhdrs/mutex16.c | 40 ------ testsuites/psxtests/psxhdrs/proc01.c | 29 ---- testsuites/psxtests/psxhdrs/proc02.c | 29 ---- testsuites/psxtests/psxhdrs/proc03.c | 29 ---- testsuites/psxtests/psxhdrs/proc04.c | 29 ---- testsuites/psxtests/psxhdrs/proc05.c | 29 ---- testsuites/psxtests/psxhdrs/proc06.c | 29 ---- testsuites/psxtests/psxhdrs/proc07.c | 32 ----- testsuites/psxtests/psxhdrs/proc08.c | 32 ----- testsuites/psxtests/psxhdrs/proc09.c | 33 ----- testsuites/psxtests/psxhdrs/proc10.c | 29 ---- testsuites/psxtests/psxhdrs/proc11.c | 31 ---- testsuites/psxtests/psxhdrs/proc12.c | 29 ---- testsuites/psxtests/psxhdrs/proc13.c | 29 ---- testsuites/psxtests/psxhdrs/proc14.c | 31 ---- .../psxhdrs/pthread/pthread_attr_destroy.c | 33 +++++ .../psxhdrs/pthread/pthread_attr_getdetachstate.c | 34 +++++ .../psxhdrs/pthread/pthread_attr_getguardsize.c | 36 +++++ .../psxhdrs/pthread/pthread_attr_getinheritsched.c | 34 +++++ .../psxhdrs/pthread/pthread_attr_getschedparam.c | 34 +++++ .../psxhdrs/pthread/pthread_attr_getschedpolicy.c | 34 +++++ .../psxhdrs/pthread/pthread_attr_getscope.c | 34 +++++ .../psxhdrs/pthread/pthread_attr_getstack.c | 42 ++++++ .../psxhdrs/pthread/pthread_attr_getstackaddr.c | 39 +++++ .../psxhdrs/pthread/pthread_attr_getstacksize.c | 38 +++++ .../psxtests/psxhdrs/pthread/pthread_attr_init.c | 33 +++++ .../psxhdrs/pthread/pthread_attr_setdetachstate.c | 37 +++++ .../psxhdrs/pthread/pthread_attr_setguardsize.c | 39 +++++ .../psxhdrs/pthread/pthread_attr_setinheritsched.c | 37 +++++ .../psxhdrs/pthread/pthread_attr_setschedparam.c | 34 +++++ .../psxhdrs/pthread/pthread_attr_setschedpolicy.c | 41 ++++++ .../psxhdrs/pthread/pthread_attr_setscope.c | 37 +++++ .../psxhdrs/pthread/pthread_attr_setstack.c | 45 ++++++ .../psxhdrs/pthread/pthread_attr_setstackaddr.c | 41 ++++++ .../psxhdrs/pthread/pthread_attr_setstacksize.c | 41 ++++++ .../psxtests/psxhdrs/pthread/pthread_cancel.c | 39 +++++ .../psxtests/psxhdrs/pthread/pthread_cleanup.c | 41 ++++++ .../psxhdrs/pthread/pthread_cond_broadcast.c | 33 +++++ .../psxhdrs/pthread/pthread_cond_destroy.c | 33 +++++ .../psxtests/psxhdrs/pthread/pthread_cond_init.c | 34 +++++ .../psxtests/psxhdrs/pthread/pthread_cond_signal.c | 33 +++++ .../psxhdrs/pthread/pthread_cond_timedwait.c | 35 +++++ .../psxtests/psxhdrs/pthread/pthread_cond_wait.c | 34 +++++ .../psxhdrs/pthread/pthread_condattr_destroy.c | 33 +++++ .../psxhdrs/pthread/pthread_condattr_getpshared.c | 37 +++++ .../psxhdrs/pthread/pthread_condattr_init.c | 33 +++++ .../psxhdrs/pthread/pthread_condattr_setpshared.c | 40 ++++++ .../psxtests/psxhdrs/pthread/pthread_create.c | 45 ++++++ .../psxtests/psxhdrs/pthread/pthread_detach.c | 34 +++++ .../psxtests/psxhdrs/pthread/pthread_equal.c | 34 +++++ testsuites/psxtests/psxhdrs/pthread/pthread_exit.c | 30 ++++ .../psxhdrs/pthread/pthread_getcpuclockid.c | 36 +++++ .../psxhdrs/pthread/pthread_getschedparam.c | 35 +++++ .../psxtests/psxhdrs/pthread/pthread_getspecific.c | 35 +++++ testsuites/psxtests/psxhdrs/pthread/pthread_join.c | 36 +++++ .../psxtests/psxhdrs/pthread/pthread_key_create.c | 40 ++++++ .../psxtests/psxhdrs/pthread/pthread_key_delete.c | 33 +++++ .../psxhdrs/pthread/pthread_mutex_destroy.c | 33 +++++ .../psxhdrs/pthread/pthread_mutex_getprioceiling.c | 37 +++++ .../psxtests/psxhdrs/pthread/pthread_mutex_init.c | 34 +++++ .../psxtests/psxhdrs/pthread/pthread_mutex_lock.c | 33 +++++ .../psxhdrs/pthread/pthread_mutex_setprioceiling.c | 40 ++++++ .../psxhdrs/pthread/pthread_mutex_timedlock.c | 37 +++++ .../psxhdrs/pthread/pthread_mutex_trylock.c | 33 +++++ .../psxhdrs/pthread/pthread_mutex_unlock.c | 33 +++++ .../psxhdrs/pthread/pthread_mutexattr_destroy.c | 33 +++++ .../pthread/pthread_mutexattr_getprioceiling.c | 37 +++++ .../pthread/pthread_mutexattr_getprotocol.c | 37 +++++ .../psxhdrs/pthread/pthread_mutexattr_getpshared.c | 37 +++++ .../psxhdrs/pthread/pthread_mutexattr_init.c | 33 +++++ .../pthread/pthread_mutexattr_setprioceiling.c | 37 +++++ .../pthread/pthread_mutexattr_setprotocol.c | 41 ++++++ .../psxhdrs/pthread/pthread_mutexattr_setpshared.c | 40 ++++++ testsuites/psxtests/psxhdrs/pthread/pthread_once.c | 38 +++++ testsuites/psxtests/psxhdrs/pthread/pthread_self.c | 32 +++++ .../psxhdrs/pthread/pthread_setcancelstate.c | 42 ++++++ .../psxhdrs/pthread/pthread_setcanceltype.c | 42 ++++++ .../psxhdrs/pthread/pthread_setschedparam.c | 55 +++++++ .../psxtests/psxhdrs/pthread/pthread_setspecific.c | 37 +++++ .../psxtests/psxhdrs/pthread/pthread_testcancel.c | 33 +++++ testsuites/psxtests/psxhdrs/pthread01.c | 33 ----- testsuites/psxtests/psxhdrs/pthread02.c | 33 ----- testsuites/psxtests/psxhdrs/pthread03.c | 37 ----- testsuites/psxtests/psxhdrs/pthread04.c | 34 ----- testsuites/psxtests/psxhdrs/pthread05.c | 41 ------ testsuites/psxtests/psxhdrs/pthread06.c | 38 ----- testsuites/psxtests/psxhdrs/pthread07.c | 45 ------ testsuites/psxtests/psxhdrs/pthread08.c | 30 ---- testsuites/psxtests/psxhdrs/pthread09.c | 32 ----- testsuites/psxtests/psxhdrs/pthread10.c | 34 ----- testsuites/psxtests/psxhdrs/pthread11.c | 57 -------- testsuites/psxtests/psxhdrs/pthread12.c | 37 ----- testsuites/psxtests/psxhdrs/pthread13.c | 37 ----- testsuites/psxtests/psxhdrs/pthread14.c | 34 ----- testsuites/psxtests/psxhdrs/pthread15.c | 37 ----- testsuites/psxtests/psxhdrs/pthread16.c | 34 ----- testsuites/psxtests/psxhdrs/pthread17.c | 41 ------ testsuites/psxtests/psxhdrs/pthread18.c | 34 ----- testsuites/psxtests/psxhdrs/pthread19.c | 34 ----- testsuites/psxtests/psxhdrs/pthread20.c | 34 ----- testsuites/psxtests/psxhdrs/pthread21.c | 34 ----- testsuites/psxtests/psxhdrs/pthread22.c | 55 ------- testsuites/psxtests/psxhdrs/pthread23.c | 35 ----- testsuites/psxtests/psxhdrs/pthread24.c | 41 ------ testsuites/psxtests/psxhdrs/pthread25.c | 39 ----- testsuites/psxtests/psxhdrs/pthread26.c | 36 ----- testsuites/psxtests/psxhdrs/pthread27.c | 38 ----- testsuites/psxtests/psxhdrs/pthread28.c | 39 ----- testsuites/psxtests/psxhdrs/pthread29.c | 42 ------ testsuites/psxtests/psxhdrs/pthread30.c | 42 ------ testsuites/psxtests/psxhdrs/pthread31.c | 33 ----- testsuites/psxtests/psxhdrs/pthread32.c | 41 ------ testsuites/psxtests/psxhdrs/pthread34.c | 36 ----- testsuites/psxtests/psxhdrs/pthread37.c | 45 ------ testsuites/psxtests/psxhdrs/pthread38.c | 42 ------ testsuites/psxtests/psxhdrs/pthread39.c | 39 ----- testsuites/psxtests/psxhdrs/pthread40.c | 36 ----- .../psxhdrs/sched/sched_get_priority_max.c | 40 ++++++ .../psxhdrs/sched/sched_get_priority_min.c | 40 ++++++ testsuites/psxtests/psxhdrs/sched/sched_getparam.c | 36 +++++ .../psxtests/psxhdrs/sched/sched_getscheduler.c | 35 +++++ .../psxtests/psxhdrs/sched/sched_rr_get_interval.c | 36 +++++ testsuites/psxtests/psxhdrs/sched/sched_setparam.c | 49 +++++++ .../psxtests/psxhdrs/sched/sched_setscheduler.c | 57 ++++++++ testsuites/psxtests/psxhdrs/sched/sched_yield.c | 32 +++++ testsuites/psxtests/psxhdrs/sched01.c | 49 ------- testsuites/psxtests/psxhdrs/sched02.c | 36 ----- testsuites/psxtests/psxhdrs/sched03.c | 57 -------- testsuites/psxtests/psxhdrs/sched04.c | 35 ----- testsuites/psxtests/psxhdrs/sched05.c | 32 ----- testsuites/psxtests/psxhdrs/sched06.c | 40 ------ testsuites/psxtests/psxhdrs/sched07.c | 40 ------ testsuites/psxtests/psxhdrs/sched08.c | 36 ----- .../psxtests/psxhdrs/signal/pthread_sigmask.c | 41 ++++++ testsuites/psxtests/psxhdrs/signal/raise.c | 31 ++++ testsuites/psxtests/psxhdrs/signal/signal.c | 31 ++++ testsuites/psxtests/psxhdrs/signal/sigpending.c | 31 ++++ testsuites/psxtests/psxhdrs/signal/sigprocmask.c | 37 +++++ testsuites/psxtests/psxhdrs/signal/sigsuspend.c | 31 ++++ testsuites/psxtests/psxhdrs/signal/sigtimedwait.c | 33 +++++ testsuites/psxtests/psxhdrs/signal/sigwait.c | 32 +++++ testsuites/psxtests/psxhdrs/signal/sigwaitinfo.c | 32 +++++ testsuites/psxtests/psxhdrs/signal01.c | 32 ----- testsuites/psxtests/psxhdrs/signal02.c | 32 ----- testsuites/psxtests/psxhdrs/signal03.c | 29 ---- testsuites/psxtests/psxhdrs/signal04.c | 32 ----- testsuites/psxtests/psxhdrs/signal05.c | 29 ---- testsuites/psxtests/psxhdrs/signal06.c | 44 ------ testsuites/psxtests/psxhdrs/signal07.c | 37 ----- testsuites/psxtests/psxhdrs/signal08.c | 39 ----- testsuites/psxtests/psxhdrs/signal09.c | 34 ----- testsuites/psxtests/psxhdrs/signal10.c | 30 ---- testsuites/psxtests/psxhdrs/signal11.c | 31 ---- testsuites/psxtests/psxhdrs/signal12.c | 31 ---- testsuites/psxtests/psxhdrs/signal13.c | 37 ----- testsuites/psxtests/psxhdrs/signal14.c | 31 ---- testsuites/psxtests/psxhdrs/signal15.c | 31 ---- testsuites/psxtests/psxhdrs/signal16.c | 41 ------ testsuites/psxtests/psxhdrs/signal17.c | 32 ----- testsuites/psxtests/psxhdrs/signal18.c | 33 ----- testsuites/psxtests/psxhdrs/signal19.c | 32 ----- testsuites/psxtests/psxhdrs/signal20.c | 31 ---- testsuites/psxtests/psxhdrs/signal21.c | 28 ---- testsuites/psxtests/psxhdrs/signal22.c | 31 ---- testsuites/psxtests/psxhdrs/signal23.c | 37 ----- testsuites/psxtests/psxhdrs/sync01.c | 30 ---- testsuites/psxtests/psxhdrs/sync02.c | 30 ---- testsuites/psxtests/psxhdrs/sync03.c | 24 ---- testsuites/psxtests/psxhdrs/time/asctime.c | 29 ++++ testsuites/psxtests/psxhdrs/time/asctime_r.c | 30 ++++ testsuites/psxtests/psxhdrs/time/clock.c | 28 ++++ .../psxtests/psxhdrs/time/clock_getcpuclockid.c | 34 +++++ .../psxtests/psxhdrs/time/clock_getenable_attr.c | 37 +++++ testsuites/psxtests/psxhdrs/time/clock_getres.c | 34 +++++ testsuites/psxtests/psxhdrs/time/clock_gettime.c | 34 +++++ .../psxtests/psxhdrs/time/clock_setenable_attr.c | 40 ++++++ testsuites/psxtests/psxhdrs/time/clock_settime.c | 34 +++++ testsuites/psxtests/psxhdrs/time/ctime.c | 29 ++++ testsuites/psxtests/psxhdrs/time/ctime_r.c | 30 ++++ testsuites/psxtests/psxhdrs/time/difftime.c | 33 +++++ testsuites/psxtests/psxhdrs/time/gmtime.c | 29 ++++ testsuites/psxtests/psxhdrs/time/gmtime_r.c | 30 ++++ testsuites/psxtests/psxhdrs/time/localtime.c | 29 ++++ testsuites/psxtests/psxhdrs/time/localtime_r.c | 30 ++++ testsuites/psxtests/psxhdrs/time/mktime.c | 39 +++++ testsuites/psxtests/psxhdrs/time/nanosleep.c | 36 +++++ testsuites/psxtests/psxhdrs/time/strftime.c | 33 +++++ testsuites/psxtests/psxhdrs/time/time.c | 28 ++++ testsuites/psxtests/psxhdrs/time/timer_create.c | 42 ++++++ testsuites/psxtests/psxhdrs/time/timer_delete.c | 33 +++++ .../psxtests/psxhdrs/time/timer_getoverrun.c | 33 +++++ testsuites/psxtests/psxhdrs/time/timer_gettime.c | 34 +++++ testsuites/psxtests/psxhdrs/time/timer_settime.c | 44 ++++++ testsuites/psxtests/psxhdrs/time01.c | 28 ---- testsuites/psxtests/psxhdrs/time02.c | 33 ----- testsuites/psxtests/psxhdrs/time03.c | 39 ----- testsuites/psxtests/psxhdrs/time04.c | 28 ---- testsuites/psxtests/psxhdrs/time05.c | 33 ----- testsuites/psxtests/psxhdrs/time06.c | 29 ---- testsuites/psxtests/psxhdrs/time07.c | 29 ---- testsuites/psxtests/psxhdrs/time08.c | 29 ---- testsuites/psxtests/psxhdrs/time09.c | 29 ---- testsuites/psxtests/psxhdrs/time10.c | 30 ---- testsuites/psxtests/psxhdrs/time11.c | 30 ---- testsuites/psxtests/psxhdrs/time12.c | 30 ---- testsuites/psxtests/psxhdrs/time13.c | 30 ---- testsuites/psxtests/psxhdrs/timer01.c | 42 ------ testsuites/psxtests/psxhdrs/timer02.c | 33 ----- testsuites/psxtests/psxhdrs/timer03.c | 44 ------ testsuites/psxtests/psxhdrs/timer04.c | 34 ----- testsuites/psxtests/psxhdrs/timer05.c | 33 ----- testsuites/psxtests/psxhdrs/timer06.c | 36 ----- testsuites/psxtests/psxhdrs/timer07.c | 30 ---- testsuites/psxtests/psxhdrs/unistd/alarm.c | 31 ++++ testsuites/psxtests/psxhdrs/unistd/fdatasync.c | 30 ++++ testsuites/psxtests/psxhdrs/unistd/fsync.c | 30 ++++ testsuites/psxtests/psxhdrs/unistd/getegid.c | 29 ++++ testsuites/psxtests/psxhdrs/unistd/geteuid.c | 29 ++++ testsuites/psxtests/psxhdrs/unistd/getgid.c | 29 ++++ testsuites/psxtests/psxhdrs/unistd/getgroups.c | 33 +++++ testsuites/psxtests/psxhdrs/unistd/getlogin.c | 29 ++++ testsuites/psxtests/psxhdrs/unistd/getlogin_r.c | 31 ++++ testsuites/psxtests/psxhdrs/unistd/getpgrp.c | 29 ++++ testsuites/psxtests/psxhdrs/unistd/getpid.c | 29 ++++ testsuites/psxtests/psxhdrs/unistd/getppid.c | 29 ++++ testsuites/psxtests/psxhdrs/unistd/getuid.c | 29 ++++ testsuites/psxtests/psxhdrs/unistd/pause.c | 28 ++++ testsuites/psxtests/psxhdrs/unistd/setgid.c | 32 +++++ testsuites/psxtests/psxhdrs/unistd/setpgid.c | 31 ++++ testsuites/psxtests/psxhdrs/unistd/setsid.c | 29 ++++ testsuites/psxtests/psxhdrs/unistd/setuid.c | 32 +++++ testsuites/psxtests/psxhdrs/unistd/sleep.c | 31 ++++ testsuites/psxtests/psxhdrs/unistd/sync.c | 24 ++++ testsuites/psxtests/psxhdrs/unistd/ualarm.c | 37 +++++ testsuites/psxtests/psxhdrs/unistd/usleep.c | 30 ++++ 271 files changed, 4633 insertions(+), 4951 deletions(-) delete mode 100644 testsuites/psxtests/psxhdrs/clock01.c delete mode 100644 testsuites/psxtests/psxhdrs/clock02.c delete mode 100644 testsuites/psxtests/psxhdrs/clock03.c delete mode 100644 testsuites/psxtests/psxhdrs/clock04.c delete mode 100644 testsuites/psxtests/psxhdrs/clock05.c delete mode 100644 testsuites/psxtests/psxhdrs/clock06.c delete mode 100644 testsuites/psxtests/psxhdrs/cond01.c delete mode 100644 testsuites/psxtests/psxhdrs/cond02.c delete mode 100644 testsuites/psxtests/psxhdrs/cond03.c delete mode 100644 testsuites/psxtests/psxhdrs/cond04.c delete mode 100644 testsuites/psxtests/psxhdrs/cond05.c delete mode 100644 testsuites/psxtests/psxhdrs/cond06.c delete mode 100644 testsuites/psxtests/psxhdrs/cond07.c delete mode 100644 testsuites/psxtests/psxhdrs/cond08.c delete mode 100644 testsuites/psxtests/psxhdrs/cond09.c delete mode 100644 testsuites/psxtests/psxhdrs/cond10.c delete mode 100644 testsuites/psxtests/psxhdrs/key01.c delete mode 100644 testsuites/psxtests/psxhdrs/key02.c delete mode 100644 testsuites/psxtests/psxhdrs/key03.c delete mode 100644 testsuites/psxtests/psxhdrs/key04.c delete mode 100644 testsuites/psxtests/psxhdrs/mutex01.c delete mode 100644 testsuites/psxtests/psxhdrs/mutex02.c delete mode 100644 testsuites/psxtests/psxhdrs/mutex03.c delete mode 100644 testsuites/psxtests/psxhdrs/mutex04.c delete mode 100644 testsuites/psxtests/psxhdrs/mutex05.c delete mode 100644 testsuites/psxtests/psxhdrs/mutex06.c delete mode 100644 testsuites/psxtests/psxhdrs/mutex07.c delete mode 100644 testsuites/psxtests/psxhdrs/mutex08.c delete mode 100644 testsuites/psxtests/psxhdrs/mutex09.c delete mode 100644 testsuites/psxtests/psxhdrs/mutex10.c delete mode 100644 testsuites/psxtests/psxhdrs/mutex11.c delete mode 100644 testsuites/psxtests/psxhdrs/mutex12.c delete mode 100644 testsuites/psxtests/psxhdrs/mutex13.c delete mode 100644 testsuites/psxtests/psxhdrs/mutex14.c delete mode 100644 testsuites/psxtests/psxhdrs/mutex15.c delete mode 100644 testsuites/psxtests/psxhdrs/mutex16.c delete mode 100644 testsuites/psxtests/psxhdrs/proc01.c delete mode 100644 testsuites/psxtests/psxhdrs/proc02.c delete mode 100644 testsuites/psxtests/psxhdrs/proc03.c delete mode 100644 testsuites/psxtests/psxhdrs/proc04.c delete mode 100644 testsuites/psxtests/psxhdrs/proc05.c delete mode 100644 testsuites/psxtests/psxhdrs/proc06.c delete mode 100644 testsuites/psxtests/psxhdrs/proc07.c delete mode 100644 testsuites/psxtests/psxhdrs/proc08.c delete mode 100644 testsuites/psxtests/psxhdrs/proc09.c delete mode 100644 testsuites/psxtests/psxhdrs/proc10.c delete mode 100644 testsuites/psxtests/psxhdrs/proc11.c delete mode 100644 testsuites/psxtests/psxhdrs/proc12.c delete mode 100644 testsuites/psxtests/psxhdrs/proc13.c delete mode 100644 testsuites/psxtests/psxhdrs/proc14.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_destroy.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_getdetachstate.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_getguardsize.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_getinheritsched.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedparam.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedpolicy.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_getscope.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstack.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstackaddr.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstacksize.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_init.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_setdetachstate.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_setguardsize.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_setinheritsched.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedparam.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedpolicy.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_setscope.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstack.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstackaddr.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstacksize.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_cancel.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_cleanup.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_cond_broadcast.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_cond_destroy.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_cond_init.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_cond_signal.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_cond_timedwait.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_cond_wait.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_condattr_destroy.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_condattr_getpshared.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_condattr_init.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_condattr_setpshared.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_create.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_detach.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_equal.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_exit.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_getcpuclockid.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_getschedparam.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_getspecific.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_join.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_key_create.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_key_delete.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_mutex_destroy.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_mutex_getprioceiling.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_mutex_init.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_mutex_lock.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_mutex_setprioceiling.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_mutex_timedlock.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_mutex_trylock.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_mutex_unlock.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_destroy.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprioceiling.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprotocol.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getpshared.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_init.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprioceiling.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprotocol.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setpshared.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_once.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_self.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_setcancelstate.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_setcanceltype.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_setschedparam.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_setspecific.c create mode 100644 testsuites/psxtests/psxhdrs/pthread/pthread_testcancel.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread01.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread02.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread03.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread04.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread05.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread06.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread07.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread08.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread09.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread10.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread11.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread12.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread13.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread14.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread15.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread16.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread17.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread18.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread19.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread20.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread21.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread22.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread23.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread24.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread25.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread26.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread27.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread28.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread29.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread30.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread31.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread32.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread34.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread37.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread38.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread39.c delete mode 100644 testsuites/psxtests/psxhdrs/pthread40.c create mode 100644 testsuites/psxtests/psxhdrs/sched/sched_get_priority_max.c create mode 100644 testsuites/psxtests/psxhdrs/sched/sched_get_priority_min.c create mode 100644 testsuites/psxtests/psxhdrs/sched/sched_getparam.c create mode 100644 testsuites/psxtests/psxhdrs/sched/sched_getscheduler.c create mode 100644 testsuites/psxtests/psxhdrs/sched/sched_rr_get_interval.c create mode 100644 testsuites/psxtests/psxhdrs/sched/sched_setparam.c create mode 100644 testsuites/psxtests/psxhdrs/sched/sched_setscheduler.c create mode 100644 testsuites/psxtests/psxhdrs/sched/sched_yield.c delete mode 100644 testsuites/psxtests/psxhdrs/sched01.c delete mode 100644 testsuites/psxtests/psxhdrs/sched02.c delete mode 100644 testsuites/psxtests/psxhdrs/sched03.c delete mode 100644 testsuites/psxtests/psxhdrs/sched04.c delete mode 100644 testsuites/psxtests/psxhdrs/sched05.c delete mode 100644 testsuites/psxtests/psxhdrs/sched06.c delete mode 100644 testsuites/psxtests/psxhdrs/sched07.c delete mode 100644 testsuites/psxtests/psxhdrs/sched08.c create mode 100644 testsuites/psxtests/psxhdrs/signal/pthread_sigmask.c create mode 100644 testsuites/psxtests/psxhdrs/signal/raise.c create mode 100644 testsuites/psxtests/psxhdrs/signal/signal.c create mode 100644 testsuites/psxtests/psxhdrs/signal/sigpending.c create mode 100644 testsuites/psxtests/psxhdrs/signal/sigprocmask.c create mode 100644 testsuites/psxtests/psxhdrs/signal/sigsuspend.c create mode 100644 testsuites/psxtests/psxhdrs/signal/sigtimedwait.c create mode 100644 testsuites/psxtests/psxhdrs/signal/sigwait.c create mode 100644 testsuites/psxtests/psxhdrs/signal/sigwaitinfo.c delete mode 100644 testsuites/psxtests/psxhdrs/signal01.c delete mode 100644 testsuites/psxtests/psxhdrs/signal02.c delete mode 100644 testsuites/psxtests/psxhdrs/signal03.c delete mode 100644 testsuites/psxtests/psxhdrs/signal04.c delete mode 100644 testsuites/psxtests/psxhdrs/signal05.c delete mode 100644 testsuites/psxtests/psxhdrs/signal06.c delete mode 100644 testsuites/psxtests/psxhdrs/signal07.c delete mode 100644 testsuites/psxtests/psxhdrs/signal08.c delete mode 100644 testsuites/psxtests/psxhdrs/signal09.c delete mode 100644 testsuites/psxtests/psxhdrs/signal10.c delete mode 100644 testsuites/psxtests/psxhdrs/signal11.c delete mode 100644 testsuites/psxtests/psxhdrs/signal12.c delete mode 100644 testsuites/psxtests/psxhdrs/signal13.c delete mode 100644 testsuites/psxtests/psxhdrs/signal14.c delete mode 100644 testsuites/psxtests/psxhdrs/signal15.c delete mode 100644 testsuites/psxtests/psxhdrs/signal16.c delete mode 100644 testsuites/psxtests/psxhdrs/signal17.c delete mode 100644 testsuites/psxtests/psxhdrs/signal18.c delete mode 100644 testsuites/psxtests/psxhdrs/signal19.c delete mode 100644 testsuites/psxtests/psxhdrs/signal20.c delete mode 100644 testsuites/psxtests/psxhdrs/signal21.c delete mode 100644 testsuites/psxtests/psxhdrs/signal22.c delete mode 100644 testsuites/psxtests/psxhdrs/signal23.c delete mode 100644 testsuites/psxtests/psxhdrs/sync01.c delete mode 100644 testsuites/psxtests/psxhdrs/sync02.c delete mode 100644 testsuites/psxtests/psxhdrs/sync03.c create mode 100644 testsuites/psxtests/psxhdrs/time/asctime.c create mode 100644 testsuites/psxtests/psxhdrs/time/asctime_r.c create mode 100644 testsuites/psxtests/psxhdrs/time/clock.c create mode 100644 testsuites/psxtests/psxhdrs/time/clock_getcpuclockid.c create mode 100644 testsuites/psxtests/psxhdrs/time/clock_getenable_attr.c create mode 100644 testsuites/psxtests/psxhdrs/time/clock_getres.c create mode 100644 testsuites/psxtests/psxhdrs/time/clock_gettime.c create mode 100644 testsuites/psxtests/psxhdrs/time/clock_setenable_attr.c create mode 100644 testsuites/psxtests/psxhdrs/time/clock_settime.c create mode 100644 testsuites/psxtests/psxhdrs/time/ctime.c create mode 100644 testsuites/psxtests/psxhdrs/time/ctime_r.c create mode 100644 testsuites/psxtests/psxhdrs/time/difftime.c create mode 100644 testsuites/psxtests/psxhdrs/time/gmtime.c create mode 100644 testsuites/psxtests/psxhdrs/time/gmtime_r.c create mode 100644 testsuites/psxtests/psxhdrs/time/localtime.c create mode 100644 testsuites/psxtests/psxhdrs/time/localtime_r.c create mode 100644 testsuites/psxtests/psxhdrs/time/mktime.c create mode 100644 testsuites/psxtests/psxhdrs/time/nanosleep.c create mode 100644 testsuites/psxtests/psxhdrs/time/strftime.c create mode 100644 testsuites/psxtests/psxhdrs/time/time.c create mode 100644 testsuites/psxtests/psxhdrs/time/timer_create.c create mode 100644 testsuites/psxtests/psxhdrs/time/timer_delete.c create mode 100644 testsuites/psxtests/psxhdrs/time/timer_getoverrun.c create mode 100644 testsuites/psxtests/psxhdrs/time/timer_gettime.c create mode 100644 testsuites/psxtests/psxhdrs/time/timer_settime.c delete mode 100644 testsuites/psxtests/psxhdrs/time01.c delete mode 100644 testsuites/psxtests/psxhdrs/time02.c delete mode 100644 testsuites/psxtests/psxhdrs/time03.c delete mode 100644 testsuites/psxtests/psxhdrs/time04.c delete mode 100644 testsuites/psxtests/psxhdrs/time05.c delete mode 100644 testsuites/psxtests/psxhdrs/time06.c delete mode 100644 testsuites/psxtests/psxhdrs/time07.c delete mode 100644 testsuites/psxtests/psxhdrs/time08.c delete mode 100644 testsuites/psxtests/psxhdrs/time09.c delete mode 100644 testsuites/psxtests/psxhdrs/time10.c delete mode 100644 testsuites/psxtests/psxhdrs/time11.c delete mode 100644 testsuites/psxtests/psxhdrs/time12.c delete mode 100644 testsuites/psxtests/psxhdrs/time13.c delete mode 100644 testsuites/psxtests/psxhdrs/timer01.c delete mode 100644 testsuites/psxtests/psxhdrs/timer02.c delete mode 100644 testsuites/psxtests/psxhdrs/timer03.c delete mode 100644 testsuites/psxtests/psxhdrs/timer04.c delete mode 100644 testsuites/psxtests/psxhdrs/timer05.c delete mode 100644 testsuites/psxtests/psxhdrs/timer06.c delete mode 100644 testsuites/psxtests/psxhdrs/timer07.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/alarm.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/fdatasync.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/fsync.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/getegid.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/geteuid.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/getgid.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/getgroups.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/getlogin.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/getlogin_r.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/getpgrp.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/getpid.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/getppid.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/getuid.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/pause.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/setgid.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/setpgid.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/setsid.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/setuid.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/sleep.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/sync.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/ualarm.c create mode 100644 testsuites/psxtests/psxhdrs/unistd/usleep.c diff --git a/testsuites/psxtests/psxhdrs/Makefile.am b/testsuites/psxtests/psxhdrs/Makefile.am index 6b0d5d658d..0888e24aaf 100644 --- a/testsuites/psxtests/psxhdrs/Makefile.am +++ b/testsuites/psxtests/psxhdrs/Makefile.am @@ -1,26 +1,140 @@ noinst_LIBRARIES = lib.a -lib_a_SOURCES = clock01.c clock02.c clock03.c clock04.c clock05.c clock06.c \ - cond01.c cond02.c cond03.c cond04.c cond05.c cond06.c cond07.c cond08.c \ - cond09.c cond10.c key01.c key02.c key03.c key04.c mutex01.c mutex02.c \ - mutex03.c mutex04.c mutex05.c mutex06.c mutex07.c mutex08.c mutex09.c \ - mutex10.c mutex11.c mutex12.c mutex13.c mutex14.c mutex15.c mutex16.c \ - pthread01.c pthread02.c pthread03.c pthread04.c pthread05.c pthread06.c \ - pthread07.c pthread08.c pthread09.c pthread10.c pthread11.c pthread12.c \ - pthread13.c pthread14.c pthread15.c pthread16.c pthread17.c pthread18.c \ - pthread19.c pthread20.c pthread21.c pthread22.c pthread23.c pthread24.c \ - pthread25.c pthread26.c pthread27.c pthread28.c pthread29.c pthread30.c \ - pthread31.c pthread32.c pthread34.c \ - pthread37.c pthread38.c pthread39.c pthread40.c \ - proc01.c proc02.c proc03.c proc04.c proc05.c proc06.c proc07.c proc08.c \ - proc09.c proc10.c proc11.c proc12.c proc13.c proc14.c sched01.c \ - sched02.c sched03.c sched04.c sched05.c sched06.c sched07.c sched08.c \ - signal01.c signal02.c signal03.c signal04.c signal05.c signal06.c \ - signal07.c signal08.c signal09.c signal10.c signal11.c signal12.c \ - signal13.c signal14.c signal15.c signal16.c signal17.c signal18.c \ - signal19.c signal20.c signal21.c signal22.c signal23.c sync01.c sync02.c \ - sync03.c time01.c time02.c time03.c time04.c time05.c time06.c time07.c \ - time08.c time09.c time10.c time11.c time12.c time13.c timer01.c \ - timer02.c timer03.c timer04.c timer05.c timer06.c timer07.c +lib_a_SOURCES = + +# methods in +lib_a_SOURCES += pthread/pthread_attr_destroy.c +lib_a_SOURCES += pthread/pthread_attr_getdetachstate.c +lib_a_SOURCES += pthread/pthread_attr_getguardsize.c +lib_a_SOURCES += pthread/pthread_attr_getinheritsched.c +lib_a_SOURCES += pthread/pthread_attr_getschedparam.c +lib_a_SOURCES += pthread/pthread_attr_getschedpolicy.c +lib_a_SOURCES += pthread/pthread_attr_getscope.c +lib_a_SOURCES += pthread/pthread_attr_getstackaddr.c +lib_a_SOURCES += pthread/pthread_attr_getstack.c +lib_a_SOURCES += pthread/pthread_attr_getstacksize.c +lib_a_SOURCES += pthread/pthread_attr_init.c +lib_a_SOURCES += pthread/pthread_attr_setdetachstate.c +lib_a_SOURCES += pthread/pthread_attr_setguardsize.c +lib_a_SOURCES += pthread/pthread_attr_setinheritsched.c +lib_a_SOURCES += pthread/pthread_attr_setschedparam.c +lib_a_SOURCES += pthread/pthread_attr_setschedpolicy.c +lib_a_SOURCES += pthread/pthread_attr_setscope.c +lib_a_SOURCES += pthread/pthread_attr_setstackaddr.c +lib_a_SOURCES += pthread/pthread_attr_setstack.c +lib_a_SOURCES += pthread/pthread_attr_setstacksize.c +lib_a_SOURCES += pthread/pthread_cancel.c +lib_a_SOURCES += pthread/pthread_cleanup.c +lib_a_SOURCES += pthread/pthread_condattr_destroy.c +lib_a_SOURCES += pthread/pthread_condattr_getpshared.c +lib_a_SOURCES += pthread/pthread_condattr_init.c +lib_a_SOURCES += pthread/pthread_condattr_setpshared.c +lib_a_SOURCES += pthread/pthread_cond_broadcast.c +lib_a_SOURCES += pthread/pthread_cond_destroy.c +lib_a_SOURCES += pthread/pthread_cond_init.c +lib_a_SOURCES += pthread/pthread_cond_signal.c +lib_a_SOURCES += pthread/pthread_cond_timedwait.c +lib_a_SOURCES += pthread/pthread_cond_wait.c +lib_a_SOURCES += pthread/pthread_create.c +lib_a_SOURCES += pthread/pthread_detach.c +lib_a_SOURCES += pthread/pthread_equal.c +lib_a_SOURCES += pthread/pthread_exit.c +lib_a_SOURCES += pthread/pthread_getcpuclockid.c +lib_a_SOURCES += pthread/pthread_getschedparam.c +lib_a_SOURCES += pthread/pthread_getspecific.c +lib_a_SOURCES += pthread/pthread_join.c +lib_a_SOURCES += pthread/pthread_key_create.c +lib_a_SOURCES += pthread/pthread_key_delete.c +lib_a_SOURCES += pthread/pthread_mutexattr_destroy.c +lib_a_SOURCES += pthread/pthread_mutexattr_getprioceiling.c +lib_a_SOURCES += pthread/pthread_mutexattr_getprotocol.c +lib_a_SOURCES += pthread/pthread_mutexattr_getpshared.c +lib_a_SOURCES += pthread/pthread_mutexattr_init.c +lib_a_SOURCES += pthread/pthread_mutexattr_setprioceiling.c +lib_a_SOURCES += pthread/pthread_mutexattr_setprotocol.c +lib_a_SOURCES += pthread/pthread_mutexattr_setpshared.c +lib_a_SOURCES += pthread/pthread_mutex_destroy.c +lib_a_SOURCES += pthread/pthread_mutex_getprioceiling.c +lib_a_SOURCES += pthread/pthread_mutex_init.c +lib_a_SOURCES += pthread/pthread_mutex_lock.c +lib_a_SOURCES += pthread/pthread_mutex_setprioceiling.c +lib_a_SOURCES += pthread/pthread_mutex_timedlock.c +lib_a_SOURCES += pthread/pthread_mutex_trylock.c +lib_a_SOURCES += pthread/pthread_mutex_unlock.c +lib_a_SOURCES += pthread/pthread_once.c +lib_a_SOURCES += pthread/pthread_self.c +lib_a_SOURCES += pthread/pthread_setcancelstate.c +lib_a_SOURCES += pthread/pthread_setcanceltype.c +lib_a_SOURCES += pthread/pthread_setschedparam.c +lib_a_SOURCES += pthread/pthread_setspecific.c +lib_a_SOURCES += pthread/pthread_testcancel.c +# methods in +lib_a_SOURCES += sched/sched_getparam.c +lib_a_SOURCES += sched/sched_get_priority_max.c +lib_a_SOURCES += sched/sched_get_priority_min.c +lib_a_SOURCES += sched/sched_getscheduler.c +lib_a_SOURCES += sched/sched_rr_get_interval.c +lib_a_SOURCES += sched/sched_setparam.c +lib_a_SOURCES += sched/sched_setscheduler.c +lib_a_SOURCES += sched/sched_yield.c +# methods in +lib_a_SOURCES += signal/pthread_sigmask.c +lib_a_SOURCES += signal/raise.c +lib_a_SOURCES += signal/signal.c +lib_a_SOURCES += signal/sigpending.c +lib_a_SOURCES += signal/sigprocmask.c +lib_a_SOURCES += signal/sigsuspend.c +lib_a_SOURCES += signal/sigtimedwait.c +lib_a_SOURCES += signal/sigwait.c +lib_a_SOURCES += signal/sigwaitinfo.c +# methods in +lib_a_SOURCES += time/asctime.c +lib_a_SOURCES += time/asctime_r.c +lib_a_SOURCES += time/clock.c +lib_a_SOURCES += time/clock_getcpuclockid.c +lib_a_SOURCES += time/clock_getenable_attr.c +lib_a_SOURCES += time/clock_getres.c +lib_a_SOURCES += time/clock_gettime.c +lib_a_SOURCES += time/clock_setenable_attr.c +lib_a_SOURCES += time/clock_settime.c +lib_a_SOURCES += time/ctime.c +lib_a_SOURCES += time/ctime_r.c +lib_a_SOURCES += time/difftime.c +lib_a_SOURCES += time/gmtime.c +lib_a_SOURCES += time/gmtime_r.c +lib_a_SOURCES += time/localtime.c +lib_a_SOURCES += time/localtime_r.c +lib_a_SOURCES += time/mktime.c +lib_a_SOURCES += time/nanosleep.c +lib_a_SOURCES += time/strftime.c +lib_a_SOURCES += time/time.c +lib_a_SOURCES += time/timer_create.c +lib_a_SOURCES += time/timer_delete.c +lib_a_SOURCES += time/timer_getoverrun.c +lib_a_SOURCES += time/timer_gettime.c +lib_a_SOURCES += time/timer_settime.c +# methods in +lib_a_SOURCES += unistd/alarm.c +lib_a_SOURCES += unistd/fdatasync.c +lib_a_SOURCES += unistd/fsync.c +lib_a_SOURCES += unistd/getegid.c +lib_a_SOURCES += unistd/geteuid.c +lib_a_SOURCES += unistd/getgid.c +lib_a_SOURCES += unistd/getgroups.c +lib_a_SOURCES += unistd/getlogin.c +lib_a_SOURCES += unistd/getlogin_r.c +lib_a_SOURCES += unistd/getpgrp.c +lib_a_SOURCES += unistd/getpid.c +lib_a_SOURCES += unistd/getppid.c +lib_a_SOURCES += unistd/getuid.c +lib_a_SOURCES += unistd/pause.c +lib_a_SOURCES += unistd/setgid.c +lib_a_SOURCES += unistd/setpgid.c +lib_a_SOURCES += unistd/setsid.c +lib_a_SOURCES += unistd/setuid.c +lib_a_SOURCES += unistd/sleep.c +lib_a_SOURCES += unistd/sync.c +lib_a_SOURCES += unistd/ualarm.c +lib_a_SOURCES += unistd/usleep.c if HAS_NETWORKING # methods in diff --git a/testsuites/psxtests/psxhdrs/clock01.c b/testsuites/psxtests/psxhdrs/clock01.c deleted file mode 100644 index a12f0247d5..0000000000 --- a/testsuites/psxtests/psxhdrs/clock01.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have clock_gettime" -#endif - -int test( void ); - -int test( void ) -{ - clockid_t clock_id = 0; - struct timespec tp; - int result; - - result = clock_gettime( clock_id, &tp ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/clock02.c b/testsuites/psxtests/psxhdrs/clock02.c deleted file mode 100644 index 49a713d449..0000000000 --- a/testsuites/psxtests/psxhdrs/clock02.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have clock_settime" -#endif - -int test( void ); - -int test( void ) -{ - clockid_t clock_id = 0; - struct timespec tp; - int result; - - result = clock_settime( clock_id, &tp ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/clock03.c b/testsuites/psxtests/psxhdrs/clock03.c deleted file mode 100644 index d298aec9fd..0000000000 --- a/testsuites/psxtests/psxhdrs/clock03.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have clock_getres" -#endif - -int test( void ); - -int test( void ) -{ - clockid_t clock_id = 0; - struct timespec res; - int result; - - result = clock_getres( clock_id, &res ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/clock04.c b/testsuites/psxtests/psxhdrs/clock04.c deleted file mode 100644 index 066912e9b8..0000000000 --- a/testsuites/psxtests/psxhdrs/clock04.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_CPUTIME -#error "rtems is supposed to have clock_getcpuclockid" -#endif - -int test( void ); - -int test( void ) -{ - pid_t pid = 0; - clockid_t clock_id; - int result; - - result = clock_getcpuclockid( pid, &clock_id ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/clock05.c b/testsuites/psxtests/psxhdrs/clock05.c deleted file mode 100644 index 8d0bd70eb6..0000000000 --- a/testsuites/psxtests/psxhdrs/clock05.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_CPUTIME -#error "rtems is supposed to have clock_setenable_attr" -#endif -#ifndef _POSIX_THREAD_CPUTIME -#error "rtems is supposed to have clock_setenable_attr" -#endif - -int test( void ); - -int test( void ) -{ - clockid_t clock_id = 0; - int attr; - int result; - - attr = CLOCK_ENABLED; - attr = CLOCK_DISABLED; - - result = clock_setenable_attr( clock_id, attr ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/clock06.c b/testsuites/psxtests/psxhdrs/clock06.c deleted file mode 100644 index d3c73ba291..0000000000 --- a/testsuites/psxtests/psxhdrs/clock06.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_CPUTIME -#error "rtems is supposed to have clock_getenable_attr" -#endif -#ifndef _POSIX_THREAD_CPUTIME -#error "rtems is supposed to have clock_getenable_attr" -#endif - -int test( void ); - -int test( void ) -{ - clockid_t clock_id = 0; - int attr; - int result; - - result = clock_getenable_attr( clock_id, &attr ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/cond01.c b/testsuites/psxtests/psxhdrs/cond01.c deleted file mode 100644 index e4f71db621..0000000000 --- a/testsuites/psxtests/psxhdrs/cond01.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_condattr_init" -#endif - -int test( void ); - -int test( void ) -{ - pthread_condattr_t attribute; - int result; - - result = pthread_condattr_init( &attribute ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/cond02.c b/testsuites/psxtests/psxhdrs/cond02.c deleted file mode 100644 index 5575f9b594..0000000000 --- a/testsuites/psxtests/psxhdrs/cond02.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_condattr_destroy" -#endif - -int test( void ); - -int test( void ) -{ - pthread_condattr_t attribute; - int result; - - result = pthread_condattr_destroy( &attribute ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/cond03.c b/testsuites/psxtests/psxhdrs/cond03.c deleted file mode 100644 index 9a83d83bf8..0000000000 --- a/testsuites/psxtests/psxhdrs/cond03.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cond_init" -#endif - -int test( void ); - -int test( void ) -{ - pthread_cond_t cond = PTHREAD_COND_INITIALIZER; - pthread_condattr_t attribute; - int result; - - result = pthread_cond_init( &cond, &attribute ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/cond04.c b/testsuites/psxtests/psxhdrs/cond04.c deleted file mode 100644 index 2beef01f04..0000000000 --- a/testsuites/psxtests/psxhdrs/cond04.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cond_destroy" -#endif - -int test( void ); - -int test( void ) -{ - pthread_cond_t cond = PTHREAD_COND_INITIALIZER; - int result; - - result = pthread_cond_destroy( &cond ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/cond05.c b/testsuites/psxtests/psxhdrs/cond05.c deleted file mode 100644 index 57c83361dc..0000000000 --- a/testsuites/psxtests/psxhdrs/cond05.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cond_signal" -#endif - -int test( void ); - -int test( void ) -{ - pthread_cond_t cond = PTHREAD_COND_INITIALIZER; - int result; - - result = pthread_cond_signal( &cond ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/cond06.c b/testsuites/psxtests/psxhdrs/cond06.c deleted file mode 100644 index d9ab134eba..0000000000 --- a/testsuites/psxtests/psxhdrs/cond06.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cond_wait" -#endif - -int test( void ); - -int test( void ) -{ - pthread_cond_t cond = PTHREAD_COND_INITIALIZER; - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - int result; - - result = pthread_cond_wait( &cond, &mutex ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/cond07.c b/testsuites/psxtests/psxhdrs/cond07.c deleted file mode 100644 index c8f6183252..0000000000 --- a/testsuites/psxtests/psxhdrs/cond07.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cond_timedwait" -#endif - -int test( void ); - -int test( void ) -{ - pthread_cond_t cond = PTHREAD_COND_INITIALIZER; - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - struct timespec abstime; - int result; - - result = pthread_cond_timedwait( &cond, &mutex, &abstime ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/cond08.c b/testsuites/psxtests/psxhdrs/cond08.c deleted file mode 100644 index 74139d57de..0000000000 --- a/testsuites/psxtests/psxhdrs/cond08.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_condattr_getpshared" -#endif -#ifndef _POSIX_THREAD_PROCESS_SHARED -#error "rtems is supposed to have pthread_condattr_setpshared" -#endif - -int test( void ); - -int test( void ) -{ - pthread_condattr_t attribute; - int pshared; - int result; - - result = pthread_condattr_getpshared( &attribute, &pshared ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/cond09.c b/testsuites/psxtests/psxhdrs/cond09.c deleted file mode 100644 index db2b18d263..0000000000 --- a/testsuites/psxtests/psxhdrs/cond09.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_condattr_setpshared" -#endif -#ifndef _POSIX_THREAD_PROCESS_SHARED -#error "rtems is supposed to have pthread_condattr_setpshared" -#endif - -int test( void ); - -int test( void ) -{ - pthread_condattr_t attribute; - int pshared; - int result; - - pshared = PTHREAD_PROCESS_SHARED; - pshared = PTHREAD_PROCESS_PRIVATE; - - result = pthread_condattr_setpshared( &attribute, pshared ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/cond10.c b/testsuites/psxtests/psxhdrs/cond10.c deleted file mode 100644 index 6ba0c92149..0000000000 --- a/testsuites/psxtests/psxhdrs/cond10.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cond_broadcast" -#endif - -int test( void ); - -int test( void ) -{ - pthread_cond_t cond = PTHREAD_COND_INITIALIZER; - int result; - - result = pthread_cond_broadcast( &cond ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/key01.c b/testsuites/psxtests/psxhdrs/key01.c deleted file mode 100644 index 70322328af..0000000000 --- a/testsuites/psxtests/psxhdrs/key01.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_key_create" -#endif - -int test( void ); -void key_destructor( void *argument ); - -void key_destructor( - void *argument -) -{ -} - -int test( void ) -{ - pthread_key_t key; - int result; - - result = pthread_key_create( &key, key_destructor ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/key02.c b/testsuites/psxtests/psxhdrs/key02.c deleted file mode 100644 index c82992954c..0000000000 --- a/testsuites/psxtests/psxhdrs/key02.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_setspecific" -#endif - -int test( void ); - -int test( void ) -{ - pthread_key_t key; - int value; - int result; - - key = 0; - value = 0; - - result = pthread_setspecific( key, &value ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/key03.c b/testsuites/psxtests/psxhdrs/key03.c deleted file mode 100644 index 3be0373978..0000000000 --- a/testsuites/psxtests/psxhdrs/key03.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_getspecific" -#endif - -int test( void ); - -int test( void ) -{ - pthread_key_t key; - void *value; - - key = 0; - - value = pthread_getspecific( key ); - - return (value != 0); -} diff --git a/testsuites/psxtests/psxhdrs/key04.c b/testsuites/psxtests/psxhdrs/key04.c deleted file mode 100644 index c6c1c34dd3..0000000000 --- a/testsuites/psxtests/psxhdrs/key04.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_key_delete" -#endif - -int test( void ); - -int test( void ) -{ - pthread_key_t key = 0; - int result; - - result = pthread_key_delete( key ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/mutex01.c b/testsuites/psxtests/psxhdrs/mutex01.c deleted file mode 100644 index 73790f2019..0000000000 --- a/testsuites/psxtests/psxhdrs/mutex01.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutexattr_init" -#endif - -int test( void ); - -int test( void ) -{ - pthread_mutexattr_t attribute; - int result; - - result = pthread_mutexattr_init( &attribute ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/mutex02.c b/testsuites/psxtests/psxhdrs/mutex02.c deleted file mode 100644 index 3b2e072563..0000000000 --- a/testsuites/psxtests/psxhdrs/mutex02.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutexattr_destroy" -#endif - -int test( void ); - -int test( void ) -{ - pthread_mutexattr_t attribute; - int result; - - result = pthread_mutexattr_destroy( &attribute ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/mutex03.c b/testsuites/psxtests/psxhdrs/mutex03.c deleted file mode 100644 index b59c3f6d37..0000000000 --- a/testsuites/psxtests/psxhdrs/mutex03.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutex_init" -#endif - -int test( void ); - -int test( void ) -{ - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - pthread_mutexattr_t attribute; - int result; - - result = pthread_mutex_init( &mutex, &attribute ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/mutex04.c b/testsuites/psxtests/psxhdrs/mutex04.c deleted file mode 100644 index c577ab1c09..0000000000 --- a/testsuites/psxtests/psxhdrs/mutex04.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutex_destroy" -#endif - -int test( void ); - -int test( void ) -{ - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - int result; - - result = pthread_mutex_destroy( &mutex ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/mutex05.c b/testsuites/psxtests/psxhdrs/mutex05.c deleted file mode 100644 index 0a416f2d90..0000000000 --- a/testsuites/psxtests/psxhdrs/mutex05.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutex_lock" -#endif - -int test( void ); - -int test( void ) -{ - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - int result; - - result = pthread_mutex_lock( &mutex ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/mutex06.c b/testsuites/psxtests/psxhdrs/mutex06.c deleted file mode 100644 index fff3f84d00..0000000000 --- a/testsuites/psxtests/psxhdrs/mutex06.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutex_unlock" -#endif - -int test( void ); - -int test( void ) -{ - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - int result; - - result = pthread_mutex_unlock( &mutex ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/mutex07.c b/testsuites/psxtests/psxhdrs/mutex07.c deleted file mode 100644 index f8cc0cd5a4..0000000000 --- a/testsuites/psxtests/psxhdrs/mutex07.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIO_INHERIT -#error "rtems is supposed to have pthread_mutexattr_setprotocol" -#endif -#ifndef _POSIX_THREAD_PRIO_PROTECT -#error "rtems is supposed to have pthread_mutexattr_setprotocol" -#endif - -int test( void ); - -int test( void ) -{ - pthread_mutexattr_t attribute; - int protocol; - int result; - - protocol = PTHREAD_PRIO_NONE; - protocol = PTHREAD_PRIO_INHERIT; - protocol = PTHREAD_PRIO_PROTECT; - - result = pthread_mutexattr_setprotocol( &attribute, protocol ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/mutex08.c b/testsuites/psxtests/psxhdrs/mutex08.c deleted file mode 100644 index 20327de527..0000000000 --- a/testsuites/psxtests/psxhdrs/mutex08.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIO_INHERIT -#error "rtems is supposed to have pthread_mutexattr_getprioceiling" -#endif -#ifndef _POSIX_THREAD_PRIO_PROTECT -#error "rtems is supposed to have pthread_mutexattr_getprioceiling" -#endif - -int test( void ); - -int test( void ) -{ - pthread_mutexattr_t attribute; - int prioceiling = 0; - int result; - - result = pthread_mutexattr_getprioceiling( &attribute, &prioceiling ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/mutex09.c b/testsuites/psxtests/psxhdrs/mutex09.c deleted file mode 100644 index 31cf69f438..0000000000 --- a/testsuites/psxtests/psxhdrs/mutex09.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIO_INHERIT -#error "rtems is supposed to have pthread_mutexattr_setprioceiling" -#endif -#ifndef _POSIX_THREAD_PRIO_PROTECT -#error "rtems is supposed to have pthread_mutexattr_setprioceiling" -#endif - -int test( void ); - -int test( void ) -{ - pthread_mutexattr_t attribute; - int prioceiling = 0; - int result; - - result = pthread_mutexattr_setprioceiling( &attribute, prioceiling ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/mutex10.c b/testsuites/psxtests/psxhdrs/mutex10.c deleted file mode 100644 index a85d37047a..0000000000 --- a/testsuites/psxtests/psxhdrs/mutex10.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutexattr_getpshared" -#endif -#ifndef _POSIX_THREAD_PROCESS_SHARED -#error "rtems is supposed to have pthread_mutexattr_setpshared" -#endif - -int test( void ); - -int test( void ) -{ - pthread_mutexattr_t attribute; - int pshared; - int result; - - result = pthread_mutexattr_getpshared( &attribute, &pshared ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/mutex11.c b/testsuites/psxtests/psxhdrs/mutex11.c deleted file mode 100644 index 1a3b8e9e5e..0000000000 --- a/testsuites/psxtests/psxhdrs/mutex11.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutexattr_setpshared" -#endif -#ifndef _POSIX_THREAD_PROCESS_SHARED -#error "rtems is supposed to have pthread_mutexattr_setpshared" -#endif - -int test( void ); - -int test( void ) -{ - pthread_mutexattr_t attribute; - int pshared; - int result; - - pshared = PTHREAD_PROCESS_SHARED; - pshared = PTHREAD_PROCESS_PRIVATE; - - result = pthread_mutexattr_setpshared( &attribute, pshared ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/mutex12.c b/testsuites/psxtests/psxhdrs/mutex12.c deleted file mode 100644 index b0f517c658..0000000000 --- a/testsuites/psxtests/psxhdrs/mutex12.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutex_trylock" -#endif - -int test( void ); - -int test( void ) -{ - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - int result; - - result = pthread_mutex_trylock( &mutex ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/mutex13.c b/testsuites/psxtests/psxhdrs/mutex13.c deleted file mode 100644 index 4fbe812157..0000000000 --- a/testsuites/psxtests/psxhdrs/mutex13.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_mutex_timedlock" -#endif -#ifndef _POSIX_TIMEOUTS -#error "rtems is supposed to have pthread_mutex_timedlock" -#endif - -int test( void ); - -int test( void ) -{ - pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - struct timespec timeout; - int result; - - result = pthread_mutex_timedlock( &mutex, &timeout ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/mutex14.c b/testsuites/psxtests/psxhdrs/mutex14.c deleted file mode 100644 index a72c966dbb..0000000000 --- a/testsuites/psxtests/psxhdrs/mutex14.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIO_INHERIT -#error "rtems is supposed to have pthread_mutexattr_getprotocol" -#endif -#ifndef _POSIX_THREAD_PRIO_PROTECT -#error "rtems is supposed to have pthread_mutexattr_getprotocol" -#endif - -int test( void ); - -int test( void ) -{ - pthread_mutexattr_t attribute; - int protocol; - int result; - - result = pthread_mutexattr_getprotocol( &attribute, &protocol ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/mutex15.c b/testsuites/psxtests/psxhdrs/mutex15.c deleted file mode 100644 index 51a78b552b..0000000000 --- a/testsuites/psxtests/psxhdrs/mutex15.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIO_INHERIT -#error "rtems is supposed to have pthread_mutex_getprioceiling" -#endif -#ifndef _POSIX_THREAD_PRIO_PROTECT -#error "rtems is supposed to have pthread_mutex_getprioceiling" -#endif - -int test( void ); - -int test( void ) -{ - pthread_mutex_t mutex; - int prioceiling; - int result; - - result = pthread_mutex_getprioceiling( &mutex, &prioceiling ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/mutex16.c b/testsuites/psxtests/psxhdrs/mutex16.c deleted file mode 100644 index 754068acdd..0000000000 --- a/testsuites/psxtests/psxhdrs/mutex16.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIO_INHERIT -#error "rtems is supposed to have pthread_mutex_setprioceiling" -#endif -#ifndef _POSIX_THREAD_PRIO_PROTECT -#error "rtems is supposed to have pthread_mutex_setprioceiling" -#endif - -int test( void ); - -int test( void ) -{ - pthread_mutex_t mutex; - int prioceiling; - int oldceiling; - int result; - - prioceiling = 0; - - result = pthread_mutex_setprioceiling( &mutex, prioceiling, &oldceiling ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/proc01.c b/testsuites/psxtests/psxhdrs/proc01.c deleted file mode 100644 index 67505c6fe7..0000000000 --- a/testsuites/psxtests/psxhdrs/proc01.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -int test( void ); - -int test( void ) -{ - pid_t pid; - - pid = getpid(); - - return pid; -} diff --git a/testsuites/psxtests/psxhdrs/proc02.c b/testsuites/psxtests/psxhdrs/proc02.c deleted file mode 100644 index 1ac195208f..0000000000 --- a/testsuites/psxtests/psxhdrs/proc02.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -int test( void ); - -int test( void ) -{ - pid_t pid; - - pid = getppid(); - - return pid; -} diff --git a/testsuites/psxtests/psxhdrs/proc03.c b/testsuites/psxtests/psxhdrs/proc03.c deleted file mode 100644 index 7a08340e83..0000000000 --- a/testsuites/psxtests/psxhdrs/proc03.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -int test( void ); - -int test( void ) -{ - uid_t uid; - - uid = getuid(); - - return uid; -} diff --git a/testsuites/psxtests/psxhdrs/proc04.c b/testsuites/psxtests/psxhdrs/proc04.c deleted file mode 100644 index beffd5ae6c..0000000000 --- a/testsuites/psxtests/psxhdrs/proc04.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -int test( void ); - -int test( void ) -{ - uid_t uid; - - uid = geteuid(); - - return uid; -} diff --git a/testsuites/psxtests/psxhdrs/proc05.c b/testsuites/psxtests/psxhdrs/proc05.c deleted file mode 100644 index 515c7144a4..0000000000 --- a/testsuites/psxtests/psxhdrs/proc05.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -int test( void ); - -int test( void ) -{ - gid_t gid; - - gid = getgid(); - - return gid; -} diff --git a/testsuites/psxtests/psxhdrs/proc06.c b/testsuites/psxtests/psxhdrs/proc06.c deleted file mode 100644 index c4698badeb..0000000000 --- a/testsuites/psxtests/psxhdrs/proc06.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -int test( void ); - -int test( void ) -{ - gid_t gid; - - gid = getegid(); - - return gid; -} diff --git a/testsuites/psxtests/psxhdrs/proc07.c b/testsuites/psxtests/psxhdrs/proc07.c deleted file mode 100644 index 28457edba8..0000000000 --- a/testsuites/psxtests/psxhdrs/proc07.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -int test( void ); - -int test( void ) -{ - uid_t uid; - int result; - - uid = 0; - - result = setuid( uid ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/proc08.c b/testsuites/psxtests/psxhdrs/proc08.c deleted file mode 100644 index ac3be6af96..0000000000 --- a/testsuites/psxtests/psxhdrs/proc08.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -int test( void ); - -int test( void ) -{ - gid_t gid; - int result; - - gid = 0; - - result = setgid( gid ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/proc09.c b/testsuites/psxtests/psxhdrs/proc09.c deleted file mode 100644 index 4402251914..0000000000 --- a/testsuites/psxtests/psxhdrs/proc09.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -int test( void ); - -int test( void ) -{ - gid_t grouplist[ 20 ]; - int gidsetsize; - int result; - - gidsetsize = 20; - - result = getgroups( gidsetsize, grouplist ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/proc10.c b/testsuites/psxtests/psxhdrs/proc10.c deleted file mode 100644 index e7ace225e7..0000000000 --- a/testsuites/psxtests/psxhdrs/proc10.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -int test( void ); - -int test( void ) -{ - char *loginname; - - loginname = getlogin(); - - return (loginname == NULL) ? -1 : 0; -} diff --git a/testsuites/psxtests/psxhdrs/proc11.c b/testsuites/psxtests/psxhdrs/proc11.c deleted file mode 100644 index 78d6de1d05..0000000000 --- a/testsuites/psxtests/psxhdrs/proc11.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include /* for LOGIN_NAME_MAX */ - -int test( void ); - -int test( void ) -{ - char loginnamebuffer[ LOGIN_NAME_MAX ]; - int result; - - result = getlogin_r( loginnamebuffer, LOGIN_NAME_MAX ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/proc12.c b/testsuites/psxtests/psxhdrs/proc12.c deleted file mode 100644 index fc11fe2171..0000000000 --- a/testsuites/psxtests/psxhdrs/proc12.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -int test( void ); - -int test( void ) -{ - pid_t pgrp; - - pgrp = getpgrp(); - - return (pgrp == -1) ? -1 : 0; -} diff --git a/testsuites/psxtests/psxhdrs/proc13.c b/testsuites/psxtests/psxhdrs/proc13.c deleted file mode 100644 index 7bb043453e..0000000000 --- a/testsuites/psxtests/psxhdrs/proc13.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -int test( void ); - -int test( void ) -{ - pid_t pid; - - pid = setsid(); - - return (pid == -1) ? -1 : 0; -} diff --git a/testsuites/psxtests/psxhdrs/proc14.c b/testsuites/psxtests/psxhdrs/proc14.c deleted file mode 100644 index daed07f6b1..0000000000 --- a/testsuites/psxtests/psxhdrs/proc14.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -int test( void ); - -int test( void ) -{ - pid_t pid = 0; - pid_t pgid = 0; - int result; - - result = setpgid( pid, pgid ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_destroy.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_destroy.c new file mode 100644 index 0000000000..05a0fedb08 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_destroy.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_attr_destroy" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attribute; + int result; + + result = pthread_attr_destroy( &attribute ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getdetachstate.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getdetachstate.c new file mode 100644 index 0000000000..55164ebe73 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getdetachstate.c @@ -0,0 +1,34 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_attr_getdetachstate" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attribute; + int state; + int result; + + result = pthread_attr_getdetachstate( &attribute, &state ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getguardsize.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getguardsize.c new file mode 100644 index 0000000000..3780747365 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getguardsize.c @@ -0,0 +1,36 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#if HAVE_DECL_PTHREAD_ATTR_GETGUARDSIZE +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_getstacksize" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attribute; + size_t size; + int result; + + result = pthread_attr_getguardsize( &attribute, &size ); + + return result; +} +#endif diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getinheritsched.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getinheritsched.c new file mode 100644 index 0000000000..df73441d28 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getinheritsched.c @@ -0,0 +1,34 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING +#error "RTEMS is supposed to have pthread_attr_getinheritsched" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attr; + int inheritsched; + int result; + + result = pthread_attr_getinheritsched( &attr, &inheritsched ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedparam.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedparam.c new file mode 100644 index 0000000000..b44f73073b --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedparam.c @@ -0,0 +1,34 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING +#error "RTEMS is supposed to have pthread_attr_getschedparam" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attr; + struct sched_param param; + int result; + + result = pthread_attr_getschedparam( &attr, ¶m ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedpolicy.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedpolicy.c new file mode 100644 index 0000000000..e2a34b7aa6 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getschedpolicy.c @@ -0,0 +1,34 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING +#error "RTEMS is supposed to have pthread_attr_getschedpolicy" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attr; + int policy; + int result; + + result = pthread_attr_getschedpolicy( &attr, &policy ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getscope.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getscope.c new file mode 100644 index 0000000000..f32137c849 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getscope.c @@ -0,0 +1,34 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING +#error "RTEMS is supposed to have pthread_attr_getscope" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attr; + int contentionscope; + int result; + + result = pthread_attr_getscope( &attr, &contentionscope ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstack.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstack.c new file mode 100644 index 0000000000..bbef6a8ce1 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstack.c @@ -0,0 +1,42 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2010. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#if HAVE_DECL_PTHREAD_ATTR_SETSTACK +#include +#include /* only for PTHREAD_STACK_MIN */ + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_getstackaddr" +#endif + +#ifndef _POSIX_THREAD_ATTR_STACKADDR +#error "rtems is supposed to have pthread_getstackaddr" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attribute; + void *stackaddr; + size_t stacksize; + int result; + + result = pthread_attr_getstack( &attribute, &stackaddr, &stacksize ); + + return result; +} +#endif diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstackaddr.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstackaddr.c new file mode 100644 index 0000000000..0e84c5844a --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstackaddr.c @@ -0,0 +1,39 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include /* only for PTHREAD_STACK_MIN */ + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_getstackaddr" +#endif + +#ifndef _POSIX_THREAD_ATTR_STACKADDR +#error "rtems is supposed to have pthread_getstackaddr" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attribute; + void *stackaddr; + int result; + + result = pthread_attr_getstackaddr( &attribute, &stackaddr ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstacksize.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstacksize.c new file mode 100644 index 0000000000..bd9cdff8e3 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstacksize.c @@ -0,0 +1,38 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_getstacksize" +#endif + +#ifndef _POSIX_THREAD_ATTR_STACKSIZE +#error "rtems is supposed to have pthread_getstacksize" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attribute; + size_t size; + int result; + + result = pthread_attr_getstacksize( &attribute, &size ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_init.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_init.c new file mode 100644 index 0000000000..d0fb6cb5ee --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_init.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_attr_init" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attribute; + int result; + + result = pthread_attr_init( &attribute ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setdetachstate.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setdetachstate.c new file mode 100644 index 0000000000..c752d4e935 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setdetachstate.c @@ -0,0 +1,37 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_attr_setdetachstate" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attribute; + int state; + int result; + + state = PTHREAD_CREATE_DETACHED; + state = PTHREAD_CREATE_JOINABLE; + + result = pthread_attr_setdetachstate( &attribute, state ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setguardsize.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setguardsize.c new file mode 100644 index 0000000000..ea9338a715 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setguardsize.c @@ -0,0 +1,39 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2010. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#if HAVE_DECL_PTHREAD_ATTR_SETGUARDSIZE +#include +#include /* only for PTHREAD_STACK_MIN */ + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_setstacksize" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attribute; + size_t size; + int result; + + size = PTHREAD_STACK_MIN; + + result = pthread_attr_setguardsize( &attribute, size ); + + return result; +} +#endif diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setinheritsched.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setinheritsched.c new file mode 100644 index 0000000000..b82c10be37 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setinheritsched.c @@ -0,0 +1,37 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING +#error "RTEMS is supposed to have pthread_attr_setinheritsched" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attr; + int inheritsched; + int result; + + inheritsched = PTHREAD_INHERIT_SCHED; + inheritsched = PTHREAD_EXPLICIT_SCHED; + + result = pthread_attr_setinheritsched( &attr, inheritsched ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedparam.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedparam.c new file mode 100644 index 0000000000..0454e8b60c --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedparam.c @@ -0,0 +1,34 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING +#error "RTEMS is supposed to have pthread_attr_setschedparam" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attr; + struct sched_param param; + int result; + + result = pthread_attr_setschedparam( &attr, ¶m ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedpolicy.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedpolicy.c new file mode 100644 index 0000000000..519010e6e4 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setschedpolicy.c @@ -0,0 +1,41 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING +#error "RTEMS is supposed to have pthread_attr_setschedpolicy" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attr; + int policy; + int result; + + policy = SCHED_FIFO; + policy = SCHED_RR; + policy = SCHED_OTHER; +#ifdef _POSIX_SPORADIC_SERVER + policy = SCHED_SPORADIC; +#endif + + result = pthread_attr_setschedpolicy( &attr, policy ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setscope.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setscope.c new file mode 100644 index 0000000000..9372758c2a --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setscope.c @@ -0,0 +1,37 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING +#error "RTEMS is supposed to have pthread_attr_setscope" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attr; + int contentionscope; + int result; + + contentionscope = PTHREAD_SCOPE_SYSTEM; + contentionscope = PTHREAD_SCOPE_PROCESS; + + result = pthread_attr_setscope( &attr, contentionscope ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstack.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstack.c new file mode 100644 index 0000000000..a4de9c8f78 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstack.c @@ -0,0 +1,45 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2010. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#if HAVE_DECL_PTHREAD_ATTR_SETSTACK +#include +#include /* only for PTHREAD_STACK_MIN */ + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_setstackaddr" +#endif + +#ifndef _POSIX_THREAD_ATTR_STACKADDR +#error "rtems is supposed to have pthread_setstackaddr" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attribute; + void *stackaddr; + size_t stacksize; + int result; + + stackaddr = NULL; + stacksize = 1024; + + result = pthread_attr_setstack( &attribute, stackaddr, stacksize ); + + return result; +} +#endif diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstackaddr.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstackaddr.c new file mode 100644 index 0000000000..661826f86b --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstackaddr.c @@ -0,0 +1,41 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include /* only for PTHREAD_STACK_MIN */ + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_setstackaddr" +#endif + +#ifndef _POSIX_THREAD_ATTR_STACKADDR +#error "rtems is supposed to have pthread_setstackaddr" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attribute; + void *stackaddr; + int result; + + stackaddr = NULL; + + result = pthread_attr_setstackaddr( &attribute, stackaddr ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstacksize.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstacksize.c new file mode 100644 index 0000000000..4a12266e6a --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstacksize.c @@ -0,0 +1,41 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include /* only for PTHREAD_STACK_MIN */ + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_setstacksize" +#endif + +#ifndef _POSIX_THREAD_ATTR_STACKSIZE +#error "rtems is supposed to have pthread_setstacksize" +#endif + +int test( void ); + +int test( void ) +{ + pthread_attr_t attribute; + size_t size; + int result; + + size = PTHREAD_STACK_MIN; + + result = pthread_attr_setstacksize( &attribute, size ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_cancel.c b/testsuites/psxtests/psxhdrs/pthread/pthread_cancel.c new file mode 100644 index 0000000000..287f394589 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_cancel.c @@ -0,0 +1,39 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_cancel" +#endif + +int test( void ); +void init_routine( void ); + +void init_routine( void ) +{ +} + +int test( void ) +{ + pthread_t thread; + int result; + + thread = 0; + result = pthread_cancel( thread ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_cleanup.c b/testsuites/psxtests/psxhdrs/pthread/pthread_cleanup.c new file mode 100644 index 0000000000..647b469b5c --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_cleanup.c @@ -0,0 +1,41 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_cleanup_push" +#endif + +void test( void ); +void cleanup_routine( void *argument ); + +void cleanup_routine( + void *argument +) +{ + (void) argument; +} + +void test( void ) +{ + int argument; + + argument = 0; + + pthread_cleanup_push( cleanup_routine, &argument ); + pthread_cleanup_pop( 1 ); +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_broadcast.c b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_broadcast.c new file mode 100644 index 0000000000..6ba0c92149 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_broadcast.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_cond_broadcast" +#endif + +int test( void ); + +int test( void ) +{ + pthread_cond_t cond = PTHREAD_COND_INITIALIZER; + int result; + + result = pthread_cond_broadcast( &cond ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_destroy.c b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_destroy.c new file mode 100644 index 0000000000..2beef01f04 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_destroy.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_cond_destroy" +#endif + +int test( void ); + +int test( void ) +{ + pthread_cond_t cond = PTHREAD_COND_INITIALIZER; + int result; + + result = pthread_cond_destroy( &cond ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_init.c b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_init.c new file mode 100644 index 0000000000..9a83d83bf8 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_init.c @@ -0,0 +1,34 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_cond_init" +#endif + +int test( void ); + +int test( void ) +{ + pthread_cond_t cond = PTHREAD_COND_INITIALIZER; + pthread_condattr_t attribute; + int result; + + result = pthread_cond_init( &cond, &attribute ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_signal.c b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_signal.c new file mode 100644 index 0000000000..57c83361dc --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_signal.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_cond_signal" +#endif + +int test( void ); + +int test( void ) +{ + pthread_cond_t cond = PTHREAD_COND_INITIALIZER; + int result; + + result = pthread_cond_signal( &cond ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_timedwait.c b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_timedwait.c new file mode 100644 index 0000000000..c8f6183252 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_timedwait.c @@ -0,0 +1,35 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_cond_timedwait" +#endif + +int test( void ); + +int test( void ) +{ + pthread_cond_t cond = PTHREAD_COND_INITIALIZER; + pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + struct timespec abstime; + int result; + + result = pthread_cond_timedwait( &cond, &mutex, &abstime ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_cond_wait.c b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_wait.c new file mode 100644 index 0000000000..d9ab134eba --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_cond_wait.c @@ -0,0 +1,34 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_cond_wait" +#endif + +int test( void ); + +int test( void ) +{ + pthread_cond_t cond = PTHREAD_COND_INITIALIZER; + pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + int result; + + result = pthread_cond_wait( &cond, &mutex ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_destroy.c b/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_destroy.c new file mode 100644 index 0000000000..5575f9b594 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_destroy.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_condattr_destroy" +#endif + +int test( void ); + +int test( void ) +{ + pthread_condattr_t attribute; + int result; + + result = pthread_condattr_destroy( &attribute ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_getpshared.c b/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_getpshared.c new file mode 100644 index 0000000000..74139d57de --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_getpshared.c @@ -0,0 +1,37 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_condattr_getpshared" +#endif +#ifndef _POSIX_THREAD_PROCESS_SHARED +#error "rtems is supposed to have pthread_condattr_setpshared" +#endif + +int test( void ); + +int test( void ) +{ + pthread_condattr_t attribute; + int pshared; + int result; + + result = pthread_condattr_getpshared( &attribute, &pshared ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_init.c b/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_init.c new file mode 100644 index 0000000000..e4f71db621 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_init.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_condattr_init" +#endif + +int test( void ); + +int test( void ) +{ + pthread_condattr_t attribute; + int result; + + result = pthread_condattr_init( &attribute ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_setpshared.c b/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_setpshared.c new file mode 100644 index 0000000000..db2b18d263 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_condattr_setpshared.c @@ -0,0 +1,40 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_condattr_setpshared" +#endif +#ifndef _POSIX_THREAD_PROCESS_SHARED +#error "rtems is supposed to have pthread_condattr_setpshared" +#endif + +int test( void ); + +int test( void ) +{ + pthread_condattr_t attribute; + int pshared; + int result; + + pshared = PTHREAD_PROCESS_SHARED; + pshared = PTHREAD_PROCESS_PRIVATE; + + result = pthread_condattr_setpshared( &attribute, pshared ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_create.c b/testsuites/psxtests/psxhdrs/pthread/pthread_create.c new file mode 100644 index 0000000000..516d94bb34 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_create.c @@ -0,0 +1,45 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_create" +#endif + +int test( void ); +void *test_task( void * arg ); + +void *test_task( + void * arg +) +{ + for ( ; ; ) + ; + return NULL; +} + +int test( void ) +{ + pthread_t thread; + pthread_attr_t attribute; + void *arg = NULL; + int result; + + result = pthread_create( &thread, &attribute, test_task, arg ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_detach.c b/testsuites/psxtests/psxhdrs/pthread/pthread_detach.c new file mode 100644 index 0000000000..4b75eac362 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_detach.c @@ -0,0 +1,34 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_detach" +#endif + +int test( void ); + +int test( void ) +{ + pthread_t thread; + int result; + + thread = 0; + result = pthread_detach( thread ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_equal.c b/testsuites/psxtests/psxhdrs/pthread/pthread_equal.c new file mode 100644 index 0000000000..4e9fca919e --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_equal.c @@ -0,0 +1,34 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_equal" +#endif + +int test( void ); + +int test( void ) +{ + pthread_t id_1 = 0; + pthread_t id_2 = 0; + int result; + + result = pthread_equal( id_1, id_2 ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_exit.c b/testsuites/psxtests/psxhdrs/pthread/pthread_exit.c new file mode 100644 index 0000000000..2a68a9f6ef --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_exit.c @@ -0,0 +1,30 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_exit" +#endif + +void test( void ); + +void test( void ) +{ + void *status = NULL; + + pthread_exit( status ); +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_getcpuclockid.c b/testsuites/psxtests/psxhdrs/pthread/pthread_getcpuclockid.c new file mode 100644 index 0000000000..bf1dd33e09 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_getcpuclockid.c @@ -0,0 +1,36 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_CPUTIME +#error "rtems is supposed to have pthread_getcpuclockid" +#endif + +int test( void ); + +int test( void ) +{ + pthread_t thread; + clockid_t clock_id; + int result; + + thread = 0; + + result = pthread_getcpuclockid( thread, &clock_id ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_getschedparam.c b/testsuites/psxtests/psxhdrs/pthread/pthread_getschedparam.c new file mode 100644 index 0000000000..122a100e22 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_getschedparam.c @@ -0,0 +1,35 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING +#error "RTEMS is supposed to have pthread_getschedparam" +#endif + +int test( void ); + +int test( void ) +{ + pthread_t thread = 0; + int policy; + struct sched_param param; + int result; + + result = pthread_getschedparam( thread, &policy, ¶m ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_getspecific.c b/testsuites/psxtests/psxhdrs/pthread/pthread_getspecific.c new file mode 100644 index 0000000000..3be0373978 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_getspecific.c @@ -0,0 +1,35 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_getspecific" +#endif + +int test( void ); + +int test( void ) +{ + pthread_key_t key; + void *value; + + key = 0; + + value = pthread_getspecific( key ); + + return (value != 0); +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_join.c b/testsuites/psxtests/psxhdrs/pthread/pthread_join.c new file mode 100644 index 0000000000..69040c46f8 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_join.c @@ -0,0 +1,36 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_join" +#endif + +int test( void ); + +int test( void ) +{ + pthread_t thread; + void *value_ptr; + int result; + + thread = 0; + + result = pthread_join( thread, &value_ptr ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_key_create.c b/testsuites/psxtests/psxhdrs/pthread/pthread_key_create.c new file mode 100644 index 0000000000..70322328af --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_key_create.c @@ -0,0 +1,40 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_key_create" +#endif + +int test( void ); +void key_destructor( void *argument ); + +void key_destructor( + void *argument +) +{ +} + +int test( void ) +{ + pthread_key_t key; + int result; + + result = pthread_key_create( &key, key_destructor ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_key_delete.c b/testsuites/psxtests/psxhdrs/pthread/pthread_key_delete.c new file mode 100644 index 0000000000..c6c1c34dd3 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_key_delete.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_key_delete" +#endif + +int test( void ); + +int test( void ) +{ + pthread_key_t key = 0; + int result; + + result = pthread_key_delete( key ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_destroy.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_destroy.c new file mode 100644 index 0000000000..c577ab1c09 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_destroy.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_mutex_destroy" +#endif + +int test( void ); + +int test( void ) +{ + pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + int result; + + result = pthread_mutex_destroy( &mutex ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_getprioceiling.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_getprioceiling.c new file mode 100644 index 0000000000..51a78b552b --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_getprioceiling.c @@ -0,0 +1,37 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_PRIO_INHERIT +#error "rtems is supposed to have pthread_mutex_getprioceiling" +#endif +#ifndef _POSIX_THREAD_PRIO_PROTECT +#error "rtems is supposed to have pthread_mutex_getprioceiling" +#endif + +int test( void ); + +int test( void ) +{ + pthread_mutex_t mutex; + int prioceiling; + int result; + + result = pthread_mutex_getprioceiling( &mutex, &prioceiling ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_init.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_init.c new file mode 100644 index 0000000000..b59c3f6d37 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_init.c @@ -0,0 +1,34 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_mutex_init" +#endif + +int test( void ); + +int test( void ) +{ + pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutexattr_t attribute; + int result; + + result = pthread_mutex_init( &mutex, &attribute ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_lock.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_lock.c new file mode 100644 index 0000000000..0a416f2d90 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_lock.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_mutex_lock" +#endif + +int test( void ); + +int test( void ) +{ + pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + int result; + + result = pthread_mutex_lock( &mutex ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_setprioceiling.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_setprioceiling.c new file mode 100644 index 0000000000..754068acdd --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_setprioceiling.c @@ -0,0 +1,40 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_PRIO_INHERIT +#error "rtems is supposed to have pthread_mutex_setprioceiling" +#endif +#ifndef _POSIX_THREAD_PRIO_PROTECT +#error "rtems is supposed to have pthread_mutex_setprioceiling" +#endif + +int test( void ); + +int test( void ) +{ + pthread_mutex_t mutex; + int prioceiling; + int oldceiling; + int result; + + prioceiling = 0; + + result = pthread_mutex_setprioceiling( &mutex, prioceiling, &oldceiling ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_timedlock.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_timedlock.c new file mode 100644 index 0000000000..4fbe812157 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_timedlock.c @@ -0,0 +1,37 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_mutex_timedlock" +#endif +#ifndef _POSIX_TIMEOUTS +#error "rtems is supposed to have pthread_mutex_timedlock" +#endif + +int test( void ); + +int test( void ) +{ + pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + struct timespec timeout; + int result; + + result = pthread_mutex_timedlock( &mutex, &timeout ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_trylock.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_trylock.c new file mode 100644 index 0000000000..b0f517c658 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_trylock.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_mutex_trylock" +#endif + +int test( void ); + +int test( void ) +{ + pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + int result; + + result = pthread_mutex_trylock( &mutex ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_unlock.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_unlock.c new file mode 100644 index 0000000000..fff3f84d00 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutex_unlock.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_mutex_unlock" +#endif + +int test( void ); + +int test( void ) +{ + pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; + int result; + + result = pthread_mutex_unlock( &mutex ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_destroy.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_destroy.c new file mode 100644 index 0000000000..3b2e072563 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_destroy.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_mutexattr_destroy" +#endif + +int test( void ); + +int test( void ) +{ + pthread_mutexattr_t attribute; + int result; + + result = pthread_mutexattr_destroy( &attribute ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprioceiling.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprioceiling.c new file mode 100644 index 0000000000..20327de527 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprioceiling.c @@ -0,0 +1,37 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_PRIO_INHERIT +#error "rtems is supposed to have pthread_mutexattr_getprioceiling" +#endif +#ifndef _POSIX_THREAD_PRIO_PROTECT +#error "rtems is supposed to have pthread_mutexattr_getprioceiling" +#endif + +int test( void ); + +int test( void ) +{ + pthread_mutexattr_t attribute; + int prioceiling = 0; + int result; + + result = pthread_mutexattr_getprioceiling( &attribute, &prioceiling ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprotocol.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprotocol.c new file mode 100644 index 0000000000..a72c966dbb --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getprotocol.c @@ -0,0 +1,37 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_PRIO_INHERIT +#error "rtems is supposed to have pthread_mutexattr_getprotocol" +#endif +#ifndef _POSIX_THREAD_PRIO_PROTECT +#error "rtems is supposed to have pthread_mutexattr_getprotocol" +#endif + +int test( void ); + +int test( void ) +{ + pthread_mutexattr_t attribute; + int protocol; + int result; + + result = pthread_mutexattr_getprotocol( &attribute, &protocol ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getpshared.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getpshared.c new file mode 100644 index 0000000000..a85d37047a --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_getpshared.c @@ -0,0 +1,37 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_mutexattr_getpshared" +#endif +#ifndef _POSIX_THREAD_PROCESS_SHARED +#error "rtems is supposed to have pthread_mutexattr_setpshared" +#endif + +int test( void ); + +int test( void ) +{ + pthread_mutexattr_t attribute; + int pshared; + int result; + + result = pthread_mutexattr_getpshared( &attribute, &pshared ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_init.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_init.c new file mode 100644 index 0000000000..73790f2019 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_init.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_mutexattr_init" +#endif + +int test( void ); + +int test( void ) +{ + pthread_mutexattr_t attribute; + int result; + + result = pthread_mutexattr_init( &attribute ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprioceiling.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprioceiling.c new file mode 100644 index 0000000000..31cf69f438 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprioceiling.c @@ -0,0 +1,37 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_PRIO_INHERIT +#error "rtems is supposed to have pthread_mutexattr_setprioceiling" +#endif +#ifndef _POSIX_THREAD_PRIO_PROTECT +#error "rtems is supposed to have pthread_mutexattr_setprioceiling" +#endif + +int test( void ); + +int test( void ) +{ + pthread_mutexattr_t attribute; + int prioceiling = 0; + int result; + + result = pthread_mutexattr_setprioceiling( &attribute, prioceiling ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprotocol.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprotocol.c new file mode 100644 index 0000000000..f8cc0cd5a4 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setprotocol.c @@ -0,0 +1,41 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_PRIO_INHERIT +#error "rtems is supposed to have pthread_mutexattr_setprotocol" +#endif +#ifndef _POSIX_THREAD_PRIO_PROTECT +#error "rtems is supposed to have pthread_mutexattr_setprotocol" +#endif + +int test( void ); + +int test( void ) +{ + pthread_mutexattr_t attribute; + int protocol; + int result; + + protocol = PTHREAD_PRIO_NONE; + protocol = PTHREAD_PRIO_INHERIT; + protocol = PTHREAD_PRIO_PROTECT; + + result = pthread_mutexattr_setprotocol( &attribute, protocol ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setpshared.c b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setpshared.c new file mode 100644 index 0000000000..1a3b8e9e5e --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_mutexattr_setpshared.c @@ -0,0 +1,40 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_mutexattr_setpshared" +#endif +#ifndef _POSIX_THREAD_PROCESS_SHARED +#error "rtems is supposed to have pthread_mutexattr_setpshared" +#endif + +int test( void ); + +int test( void ) +{ + pthread_mutexattr_t attribute; + int pshared; + int result; + + pshared = PTHREAD_PROCESS_SHARED; + pshared = PTHREAD_PROCESS_PRIVATE; + + result = pthread_mutexattr_setpshared( &attribute, pshared ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_once.c b/testsuites/psxtests/psxhdrs/pthread/pthread_once.c new file mode 100644 index 0000000000..a4355e461d --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_once.c @@ -0,0 +1,38 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_once" +#endif + +int test( void ); +void init_routine( void ); + +void init_routine( void ) +{ +} + +int test( void ) +{ + pthread_once_t once_control = PTHREAD_ONCE_INIT; + int result; + + result = pthread_once( &once_control, init_routine ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_self.c b/testsuites/psxtests/psxhdrs/pthread/pthread_self.c new file mode 100644 index 0000000000..84c1d0cc03 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_self.c @@ -0,0 +1,32 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_self" +#endif + +int test( void ); + +int test( void ) +{ + pthread_t self; + + self = pthread_self(); + + return ( self != 0 ); +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_setcancelstate.c b/testsuites/psxtests/psxhdrs/pthread/pthread_setcancelstate.c new file mode 100644 index 0000000000..816908394a --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_setcancelstate.c @@ -0,0 +1,42 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_setcancelstate" +#endif + +int test( void ); +void init_routine( void ); + +void init_routine( void ) +{ +} + +int test( void ) +{ + int state; + int oldstate; + int result; + + state = PTHREAD_CANCEL_ENABLE; + state = PTHREAD_CANCEL_DISABLE; + + result = pthread_setcancelstate( state, &oldstate ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_setcanceltype.c b/testsuites/psxtests/psxhdrs/pthread/pthread_setcanceltype.c new file mode 100644 index 0000000000..f1e0adeaa4 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_setcanceltype.c @@ -0,0 +1,42 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_setcanceltype" +#endif + +int test( void ); +void init_routine( void ); + +void init_routine( void ) +{ +} + +int test( void ) +{ + int type; + int oldtype; + int result; + + type = PTHREAD_CANCEL_DEFERRED; + type = PTHREAD_CANCEL_ASYNCHRONOUS; + + result = pthread_setcanceltype( type, &oldtype ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_setschedparam.c b/testsuites/psxtests/psxhdrs/pthread/pthread_setschedparam.c new file mode 100644 index 0000000000..50cd98a815 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_setschedparam.c @@ -0,0 +1,55 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING +#error "RTEMS is supposed to have pthread_setschedparam" +#endif + +int test( void ); + +int test( void ) +{ + pthread_t thread = 0; + int policy; + struct sched_param param; + int result; + + policy = SCHED_OTHER; + policy = SCHED_FIFO; + policy = SCHED_RR; +#ifdef _POSIX_SPORADIC_SERVER + policy = SCHED_SPORADIC; +#endif + + /* + * really should use sched_get_priority_min() and sched_get_priority_max() + */ + + param.sched_priority = 0; +#ifdef _POSIX_SPORADIC_SERVER + param.sched_ss_low_priority = 0; + param.sched_ss_repl_period.tv_sec = 0; + param.sched_ss_repl_period.tv_nsec = 0; + param.sched_ss_init_budget.tv_sec = 0; + param.sched_ss_init_budget.tv_nsec = 0; +#endif + + result = pthread_setschedparam( thread, policy, ¶m ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_setspecific.c b/testsuites/psxtests/psxhdrs/pthread/pthread_setspecific.c new file mode 100644 index 0000000000..c82992954c --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_setspecific.c @@ -0,0 +1,37 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_setspecific" +#endif + +int test( void ); + +int test( void ) +{ + pthread_key_t key; + int value; + int result; + + key = 0; + value = 0; + + result = pthread_setspecific( key, &value ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_testcancel.c b/testsuites/psxtests/psxhdrs/pthread/pthread_testcancel.c new file mode 100644 index 0000000000..ef07bf9ab1 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/pthread/pthread_testcancel.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#error "rtems is supposed to have pthread_testcancel" +#endif + +void test( void ); +void init_routine( void ); + +void init_routine( void ) +{ +} + +void test( void ) +{ + pthread_testcancel(); +} diff --git a/testsuites/psxtests/psxhdrs/pthread01.c b/testsuites/psxtests/psxhdrs/pthread01.c deleted file mode 100644 index d0fb6cb5ee..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread01.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_attr_init" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attribute; - int result; - - result = pthread_attr_init( &attribute ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread02.c b/testsuites/psxtests/psxhdrs/pthread02.c deleted file mode 100644 index 05a0fedb08..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread02.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_attr_destroy" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attribute; - int result; - - result = pthread_attr_destroy( &attribute ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread03.c b/testsuites/psxtests/psxhdrs/pthread03.c deleted file mode 100644 index c752d4e935..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread03.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_attr_setdetachstate" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attribute; - int state; - int result; - - state = PTHREAD_CREATE_DETACHED; - state = PTHREAD_CREATE_JOINABLE; - - result = pthread_attr_setdetachstate( &attribute, state ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread04.c b/testsuites/psxtests/psxhdrs/pthread04.c deleted file mode 100644 index 55164ebe73..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread04.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_attr_getdetachstate" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attribute; - int state; - int result; - - result = pthread_attr_getdetachstate( &attribute, &state ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread05.c b/testsuites/psxtests/psxhdrs/pthread05.c deleted file mode 100644 index 4a12266e6a..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread05.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include /* only for PTHREAD_STACK_MIN */ - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_setstacksize" -#endif - -#ifndef _POSIX_THREAD_ATTR_STACKSIZE -#error "rtems is supposed to have pthread_setstacksize" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attribute; - size_t size; - int result; - - size = PTHREAD_STACK_MIN; - - result = pthread_attr_setstacksize( &attribute, size ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread06.c b/testsuites/psxtests/psxhdrs/pthread06.c deleted file mode 100644 index bd9cdff8e3..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread06.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_getstacksize" -#endif - -#ifndef _POSIX_THREAD_ATTR_STACKSIZE -#error "rtems is supposed to have pthread_getstacksize" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attribute; - size_t size; - int result; - - result = pthread_attr_getstacksize( &attribute, &size ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread07.c b/testsuites/psxtests/psxhdrs/pthread07.c deleted file mode 100644 index 516d94bb34..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread07.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_create" -#endif - -int test( void ); -void *test_task( void * arg ); - -void *test_task( - void * arg -) -{ - for ( ; ; ) - ; - return NULL; -} - -int test( void ) -{ - pthread_t thread; - pthread_attr_t attribute; - void *arg = NULL; - int result; - - result = pthread_create( &thread, &attribute, test_task, arg ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread08.c b/testsuites/psxtests/psxhdrs/pthread08.c deleted file mode 100644 index 2a68a9f6ef..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread08.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_exit" -#endif - -void test( void ); - -void test( void ) -{ - void *status = NULL; - - pthread_exit( status ); -} diff --git a/testsuites/psxtests/psxhdrs/pthread09.c b/testsuites/psxtests/psxhdrs/pthread09.c deleted file mode 100644 index 84c1d0cc03..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread09.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_self" -#endif - -int test( void ); - -int test( void ) -{ - pthread_t self; - - self = pthread_self(); - - return ( self != 0 ); -} diff --git a/testsuites/psxtests/psxhdrs/pthread10.c b/testsuites/psxtests/psxhdrs/pthread10.c deleted file mode 100644 index 4e9fca919e..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread10.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_equal" -#endif - -int test( void ); - -int test( void ) -{ - pthread_t id_1 = 0; - pthread_t id_2 = 0; - int result; - - result = pthread_equal( id_1, id_2 ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread11.c b/testsuites/psxtests/psxhdrs/pthread11.c deleted file mode 100644 index 4f55efd3c6..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread11.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_setschedparam" -#endif - -int test( void ); - -int test( void ) -{ - pthread_t thread; - int policy; - struct sched_param param; - int result; - - thread = 0; - - policy = SCHED_OTHER; - policy = SCHED_FIFO; - policy = SCHED_RR; -#ifdef _POSIX_SPORADIC_SERVER - policy = SCHED_SPORADIC; -#endif - - /* - * really should use sched_get_priority_min() and sched_get_priority_max() - */ - - param.sched_priority = 0; -#ifdef _POSIX_SPORADIC_SERVER - param.sched_ss_low_priority = 0; - param.sched_ss_repl_period.tv_sec = 0; - param.sched_ss_repl_period.tv_nsec = 0; - param.sched_ss_init_budget.tv_sec = 0; - param.sched_ss_init_budget.tv_nsec = 0; -#endif - - result = pthread_setschedparam( thread, policy, ¶m ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread12.c b/testsuites/psxtests/psxhdrs/pthread12.c deleted file mode 100644 index 47b69d458e..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread12.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_getschedparam" -#endif - -int test( void ); - -int test( void ) -{ - pthread_t thread; - int policy; - struct sched_param param; - int result; - - thread = 0; - - result = pthread_getschedparam( thread, &policy, ¶m ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread13.c b/testsuites/psxtests/psxhdrs/pthread13.c deleted file mode 100644 index 9372758c2a..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread13.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_attr_setscope" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attr; - int contentionscope; - int result; - - contentionscope = PTHREAD_SCOPE_SYSTEM; - contentionscope = PTHREAD_SCOPE_PROCESS; - - result = pthread_attr_setscope( &attr, contentionscope ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread14.c b/testsuites/psxtests/psxhdrs/pthread14.c deleted file mode 100644 index f32137c849..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread14.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_attr_getscope" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attr; - int contentionscope; - int result; - - result = pthread_attr_getscope( &attr, &contentionscope ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread15.c b/testsuites/psxtests/psxhdrs/pthread15.c deleted file mode 100644 index b82c10be37..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread15.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_attr_setinheritsched" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attr; - int inheritsched; - int result; - - inheritsched = PTHREAD_INHERIT_SCHED; - inheritsched = PTHREAD_EXPLICIT_SCHED; - - result = pthread_attr_setinheritsched( &attr, inheritsched ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread16.c b/testsuites/psxtests/psxhdrs/pthread16.c deleted file mode 100644 index df73441d28..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread16.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_attr_getinheritsched" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attr; - int inheritsched; - int result; - - result = pthread_attr_getinheritsched( &attr, &inheritsched ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread17.c b/testsuites/psxtests/psxhdrs/pthread17.c deleted file mode 100644 index 519010e6e4..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread17.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_attr_setschedpolicy" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attr; - int policy; - int result; - - policy = SCHED_FIFO; - policy = SCHED_RR; - policy = SCHED_OTHER; -#ifdef _POSIX_SPORADIC_SERVER - policy = SCHED_SPORADIC; -#endif - - result = pthread_attr_setschedpolicy( &attr, policy ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread18.c b/testsuites/psxtests/psxhdrs/pthread18.c deleted file mode 100644 index e2a34b7aa6..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread18.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_attr_getschedpolicy" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attr; - int policy; - int result; - - result = pthread_attr_getschedpolicy( &attr, &policy ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread19.c b/testsuites/psxtests/psxhdrs/pthread19.c deleted file mode 100644 index 0454e8b60c..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread19.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_attr_setschedparam" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attr; - struct sched_param param; - int result; - - result = pthread_attr_setschedparam( &attr, ¶m ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread20.c b/testsuites/psxtests/psxhdrs/pthread20.c deleted file mode 100644 index b44f73073b..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread20.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_attr_getschedparam" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attr; - struct sched_param param; - int result; - - result = pthread_attr_getschedparam( &attr, ¶m ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread21.c b/testsuites/psxtests/psxhdrs/pthread21.c deleted file mode 100644 index 4b75eac362..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread21.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_detach" -#endif - -int test( void ); - -int test( void ) -{ - pthread_t thread; - int result; - - thread = 0; - result = pthread_detach( thread ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread22.c b/testsuites/psxtests/psxhdrs/pthread22.c deleted file mode 100644 index 50cd98a815..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread22.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_setschedparam" -#endif - -int test( void ); - -int test( void ) -{ - pthread_t thread = 0; - int policy; - struct sched_param param; - int result; - - policy = SCHED_OTHER; - policy = SCHED_FIFO; - policy = SCHED_RR; -#ifdef _POSIX_SPORADIC_SERVER - policy = SCHED_SPORADIC; -#endif - - /* - * really should use sched_get_priority_min() and sched_get_priority_max() - */ - - param.sched_priority = 0; -#ifdef _POSIX_SPORADIC_SERVER - param.sched_ss_low_priority = 0; - param.sched_ss_repl_period.tv_sec = 0; - param.sched_ss_repl_period.tv_nsec = 0; - param.sched_ss_init_budget.tv_sec = 0; - param.sched_ss_init_budget.tv_nsec = 0; -#endif - - result = pthread_setschedparam( thread, policy, ¶m ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread23.c b/testsuites/psxtests/psxhdrs/pthread23.c deleted file mode 100644 index 122a100e22..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread23.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING -#error "RTEMS is supposed to have pthread_getschedparam" -#endif - -int test( void ); - -int test( void ) -{ - pthread_t thread = 0; - int policy; - struct sched_param param; - int result; - - result = pthread_getschedparam( thread, &policy, ¶m ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread24.c b/testsuites/psxtests/psxhdrs/pthread24.c deleted file mode 100644 index 661826f86b..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread24.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include /* only for PTHREAD_STACK_MIN */ - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_setstackaddr" -#endif - -#ifndef _POSIX_THREAD_ATTR_STACKADDR -#error "rtems is supposed to have pthread_setstackaddr" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attribute; - void *stackaddr; - int result; - - stackaddr = NULL; - - result = pthread_attr_setstackaddr( &attribute, stackaddr ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread25.c b/testsuites/psxtests/psxhdrs/pthread25.c deleted file mode 100644 index 0e84c5844a..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread25.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include /* only for PTHREAD_STACK_MIN */ - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_getstackaddr" -#endif - -#ifndef _POSIX_THREAD_ATTR_STACKADDR -#error "rtems is supposed to have pthread_getstackaddr" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attribute; - void *stackaddr; - int result; - - result = pthread_attr_getstackaddr( &attribute, &stackaddr ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread26.c b/testsuites/psxtests/psxhdrs/pthread26.c deleted file mode 100644 index 69040c46f8..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread26.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_join" -#endif - -int test( void ); - -int test( void ) -{ - pthread_t thread; - void *value_ptr; - int result; - - thread = 0; - - result = pthread_join( thread, &value_ptr ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread27.c b/testsuites/psxtests/psxhdrs/pthread27.c deleted file mode 100644 index a4355e461d..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread27.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_once" -#endif - -int test( void ); -void init_routine( void ); - -void init_routine( void ) -{ -} - -int test( void ) -{ - pthread_once_t once_control = PTHREAD_ONCE_INIT; - int result; - - result = pthread_once( &once_control, init_routine ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread28.c b/testsuites/psxtests/psxhdrs/pthread28.c deleted file mode 100644 index 287f394589..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread28.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cancel" -#endif - -int test( void ); -void init_routine( void ); - -void init_routine( void ) -{ -} - -int test( void ) -{ - pthread_t thread; - int result; - - thread = 0; - result = pthread_cancel( thread ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread29.c b/testsuites/psxtests/psxhdrs/pthread29.c deleted file mode 100644 index 816908394a..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread29.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_setcancelstate" -#endif - -int test( void ); -void init_routine( void ); - -void init_routine( void ) -{ -} - -int test( void ) -{ - int state; - int oldstate; - int result; - - state = PTHREAD_CANCEL_ENABLE; - state = PTHREAD_CANCEL_DISABLE; - - result = pthread_setcancelstate( state, &oldstate ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread30.c b/testsuites/psxtests/psxhdrs/pthread30.c deleted file mode 100644 index f1e0adeaa4..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread30.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_setcanceltype" -#endif - -int test( void ); -void init_routine( void ); - -void init_routine( void ) -{ -} - -int test( void ) -{ - int type; - int oldtype; - int result; - - type = PTHREAD_CANCEL_DEFERRED; - type = PTHREAD_CANCEL_ASYNCHRONOUS; - - result = pthread_setcanceltype( type, &oldtype ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread31.c b/testsuites/psxtests/psxhdrs/pthread31.c deleted file mode 100644 index ef07bf9ab1..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread31.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_testcancel" -#endif - -void test( void ); -void init_routine( void ); - -void init_routine( void ) -{ -} - -void test( void ) -{ - pthread_testcancel(); -} diff --git a/testsuites/psxtests/psxhdrs/pthread32.c b/testsuites/psxtests/psxhdrs/pthread32.c deleted file mode 100644 index 647b469b5c..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread32.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_cleanup_push" -#endif - -void test( void ); -void cleanup_routine( void *argument ); - -void cleanup_routine( - void *argument -) -{ - (void) argument; -} - -void test( void ) -{ - int argument; - - argument = 0; - - pthread_cleanup_push( cleanup_routine, &argument ); - pthread_cleanup_pop( 1 ); -} diff --git a/testsuites/psxtests/psxhdrs/pthread34.c b/testsuites/psxtests/psxhdrs/pthread34.c deleted file mode 100644 index bf1dd33e09..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread34.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREAD_CPUTIME -#error "rtems is supposed to have pthread_getcpuclockid" -#endif - -int test( void ); - -int test( void ) -{ - pthread_t thread; - clockid_t clock_id; - int result; - - thread = 0; - - result = pthread_getcpuclockid( thread, &clock_id ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/pthread37.c b/testsuites/psxtests/psxhdrs/pthread37.c deleted file mode 100644 index a4de9c8f78..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread37.c +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2010. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#if HAVE_DECL_PTHREAD_ATTR_SETSTACK -#include -#include /* only for PTHREAD_STACK_MIN */ - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_setstackaddr" -#endif - -#ifndef _POSIX_THREAD_ATTR_STACKADDR -#error "rtems is supposed to have pthread_setstackaddr" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attribute; - void *stackaddr; - size_t stacksize; - int result; - - stackaddr = NULL; - stacksize = 1024; - - result = pthread_attr_setstack( &attribute, stackaddr, stacksize ); - - return result; -} -#endif diff --git a/testsuites/psxtests/psxhdrs/pthread38.c b/testsuites/psxtests/psxhdrs/pthread38.c deleted file mode 100644 index bbef6a8ce1..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread38.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2010. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#if HAVE_DECL_PTHREAD_ATTR_SETSTACK -#include -#include /* only for PTHREAD_STACK_MIN */ - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_getstackaddr" -#endif - -#ifndef _POSIX_THREAD_ATTR_STACKADDR -#error "rtems is supposed to have pthread_getstackaddr" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attribute; - void *stackaddr; - size_t stacksize; - int result; - - result = pthread_attr_getstack( &attribute, &stackaddr, &stacksize ); - - return result; -} -#endif diff --git a/testsuites/psxtests/psxhdrs/pthread39.c b/testsuites/psxtests/psxhdrs/pthread39.c deleted file mode 100644 index ea9338a715..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread39.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2010. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#if HAVE_DECL_PTHREAD_ATTR_SETGUARDSIZE -#include -#include /* only for PTHREAD_STACK_MIN */ - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_setstacksize" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attribute; - size_t size; - int result; - - size = PTHREAD_STACK_MIN; - - result = pthread_attr_setguardsize( &attribute, size ); - - return result; -} -#endif diff --git a/testsuites/psxtests/psxhdrs/pthread40.c b/testsuites/psxtests/psxhdrs/pthread40.c deleted file mode 100644 index 3780747365..0000000000 --- a/testsuites/psxtests/psxhdrs/pthread40.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#if HAVE_DECL_PTHREAD_ATTR_GETGUARDSIZE -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_getstacksize" -#endif - -int test( void ); - -int test( void ) -{ - pthread_attr_t attribute; - size_t size; - int result; - - result = pthread_attr_getguardsize( &attribute, &size ); - - return result; -} -#endif diff --git a/testsuites/psxtests/psxhdrs/sched/sched_get_priority_max.c b/testsuites/psxtests/psxhdrs/sched/sched_get_priority_max.c new file mode 100644 index 0000000000..c1546e372f --- /dev/null +++ b/testsuites/psxtests/psxhdrs/sched/sched_get_priority_max.c @@ -0,0 +1,40 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_PRIORITY_SCHEDULING +#error "rtems is supposed to have sched_get_priority_max" +#endif + +int test( void ); + +int test( void ) +{ + int policy; + int result; + + policy = SCHED_RR; + policy = SCHED_FIFO; + policy = SCHED_OTHER; +#ifdef _POSIX_SPORADIC_SERVER + policy = SCHED_SPORADIC; +#endif + + result = sched_get_priority_max( policy ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/sched/sched_get_priority_min.c b/testsuites/psxtests/psxhdrs/sched/sched_get_priority_min.c new file mode 100644 index 0000000000..fbf4e09958 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/sched/sched_get_priority_min.c @@ -0,0 +1,40 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_PRIORITY_SCHEDULING +#error "rtems is supposed to have sched_get_priority_min" +#endif + +int test( void ); + +int test( void ) +{ + int policy; + int result; + + policy = SCHED_RR; + policy = SCHED_FIFO; + policy = SCHED_OTHER; +#ifdef _POSIX_SPORADIC_SERVER + policy = SCHED_SPORADIC; +#endif + + result = sched_get_priority_min( policy ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/sched/sched_getparam.c b/testsuites/psxtests/psxhdrs/sched/sched_getparam.c new file mode 100644 index 0000000000..6814410744 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/sched/sched_getparam.c @@ -0,0 +1,36 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_PRIORITY_SCHEDULING +#error "rtems is supposed to have sched_getparam" +#endif + +int test( void ); + +int test( void ) +{ + pid_t pid; + struct sched_param param; + int result; + + pid = 0; + + result = sched_getparam( pid, ¶m ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/sched/sched_getscheduler.c b/testsuites/psxtests/psxhdrs/sched/sched_getscheduler.c new file mode 100644 index 0000000000..37d6b47397 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/sched/sched_getscheduler.c @@ -0,0 +1,35 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_PRIORITY_SCHEDULING +#error "rtems is supposed to have sched_getscheduler" +#endif + +int test( void ); + +int test( void ) +{ + pid_t pid; + int result; + + pid = 0; + + result = sched_getscheduler( pid ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/sched/sched_rr_get_interval.c b/testsuites/psxtests/psxhdrs/sched/sched_rr_get_interval.c new file mode 100644 index 0000000000..5f2bd75f27 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/sched/sched_rr_get_interval.c @@ -0,0 +1,36 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_PRIORITY_SCHEDULING +#error "rtems is supposed to have sched_rr_get_interval" +#endif + +int test( void ); + +int test( void ) +{ + pid_t pid; + struct timespec interval; + int result; + + pid = 0; + + result = sched_rr_get_interval( pid, &interval ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/sched/sched_setparam.c b/testsuites/psxtests/psxhdrs/sched/sched_setparam.c new file mode 100644 index 0000000000..c703369098 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/sched/sched_setparam.c @@ -0,0 +1,49 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_PRIORITY_SCHEDULING +#error "rtems is supposed to have sched_setparam" +#endif + +int test( void ); + +int test( void ) +{ + pid_t pid; + struct sched_param param; + int result; + + pid = 0; + + /* + * really should use sched_get_priority_min() and sched_get_priority_max() + */ + + param.sched_priority = 0; +#ifdef _POSIX_SPORADIC_SERVER + param.sched_ss_low_priority = 0; + param.sched_ss_repl_period.tv_sec = 0; + param.sched_ss_repl_period.tv_nsec = 0; + param.sched_ss_init_budget.tv_sec = 0; + param.sched_ss_init_budget.tv_nsec = 0; +#endif + + result = sched_setparam( pid, ¶m ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/sched/sched_setscheduler.c b/testsuites/psxtests/psxhdrs/sched/sched_setscheduler.c new file mode 100644 index 0000000000..3e1ecacd5e --- /dev/null +++ b/testsuites/psxtests/psxhdrs/sched/sched_setscheduler.c @@ -0,0 +1,57 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_PRIORITY_SCHEDULING +#error "rtems is supposed to have sched_setscheduler" +#endif + +int test( void ); + +int test( void ) +{ + pid_t pid; + int policy; + struct sched_param param; + int result; + + pid = 0; + + policy = SCHED_RR; + policy = SCHED_FIFO; + policy = SCHED_OTHER; +#ifdef _POSIX_SPORADIC_SERVER + policy = SCHED_SPORADIC; +#endif + + /* + * really should use sched_get_priority_min() and sched_get_priority_max() + */ + + param.sched_priority = 0; +#ifdef _POSIX_SPORADIC_SERVER + param.sched_ss_low_priority = 0; + param.sched_ss_repl_period.tv_sec = 0; + param.sched_ss_repl_period.tv_nsec = 0; + param.sched_ss_init_budget.tv_sec = 0; + param.sched_ss_init_budget.tv_nsec = 0; +#endif + + result = sched_setscheduler( pid, policy, ¶m ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/sched/sched_yield.c b/testsuites/psxtests/psxhdrs/sched/sched_yield.c new file mode 100644 index 0000000000..cb50fa1c69 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/sched/sched_yield.c @@ -0,0 +1,32 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_PRIORITY_SCHEDULING +#error "rtems is supposed to have sched_yield" +#endif + +int test( void ); + +int test( void ) +{ + int result; + + result = sched_yield(); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/sched01.c b/testsuites/psxtests/psxhdrs/sched01.c deleted file mode 100644 index c703369098..0000000000 --- a/testsuites/psxtests/psxhdrs/sched01.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_PRIORITY_SCHEDULING -#error "rtems is supposed to have sched_setparam" -#endif - -int test( void ); - -int test( void ) -{ - pid_t pid; - struct sched_param param; - int result; - - pid = 0; - - /* - * really should use sched_get_priority_min() and sched_get_priority_max() - */ - - param.sched_priority = 0; -#ifdef _POSIX_SPORADIC_SERVER - param.sched_ss_low_priority = 0; - param.sched_ss_repl_period.tv_sec = 0; - param.sched_ss_repl_period.tv_nsec = 0; - param.sched_ss_init_budget.tv_sec = 0; - param.sched_ss_init_budget.tv_nsec = 0; -#endif - - result = sched_setparam( pid, ¶m ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/sched02.c b/testsuites/psxtests/psxhdrs/sched02.c deleted file mode 100644 index 6814410744..0000000000 --- a/testsuites/psxtests/psxhdrs/sched02.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_PRIORITY_SCHEDULING -#error "rtems is supposed to have sched_getparam" -#endif - -int test( void ); - -int test( void ) -{ - pid_t pid; - struct sched_param param; - int result; - - pid = 0; - - result = sched_getparam( pid, ¶m ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/sched03.c b/testsuites/psxtests/psxhdrs/sched03.c deleted file mode 100644 index 3e1ecacd5e..0000000000 --- a/testsuites/psxtests/psxhdrs/sched03.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_PRIORITY_SCHEDULING -#error "rtems is supposed to have sched_setscheduler" -#endif - -int test( void ); - -int test( void ) -{ - pid_t pid; - int policy; - struct sched_param param; - int result; - - pid = 0; - - policy = SCHED_RR; - policy = SCHED_FIFO; - policy = SCHED_OTHER; -#ifdef _POSIX_SPORADIC_SERVER - policy = SCHED_SPORADIC; -#endif - - /* - * really should use sched_get_priority_min() and sched_get_priority_max() - */ - - param.sched_priority = 0; -#ifdef _POSIX_SPORADIC_SERVER - param.sched_ss_low_priority = 0; - param.sched_ss_repl_period.tv_sec = 0; - param.sched_ss_repl_period.tv_nsec = 0; - param.sched_ss_init_budget.tv_sec = 0; - param.sched_ss_init_budget.tv_nsec = 0; -#endif - - result = sched_setscheduler( pid, policy, ¶m ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/sched04.c b/testsuites/psxtests/psxhdrs/sched04.c deleted file mode 100644 index 37d6b47397..0000000000 --- a/testsuites/psxtests/psxhdrs/sched04.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_PRIORITY_SCHEDULING -#error "rtems is supposed to have sched_getscheduler" -#endif - -int test( void ); - -int test( void ) -{ - pid_t pid; - int result; - - pid = 0; - - result = sched_getscheduler( pid ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/sched05.c b/testsuites/psxtests/psxhdrs/sched05.c deleted file mode 100644 index cb50fa1c69..0000000000 --- a/testsuites/psxtests/psxhdrs/sched05.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_PRIORITY_SCHEDULING -#error "rtems is supposed to have sched_yield" -#endif - -int test( void ); - -int test( void ) -{ - int result; - - result = sched_yield(); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/sched06.c b/testsuites/psxtests/psxhdrs/sched06.c deleted file mode 100644 index c1546e372f..0000000000 --- a/testsuites/psxtests/psxhdrs/sched06.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_PRIORITY_SCHEDULING -#error "rtems is supposed to have sched_get_priority_max" -#endif - -int test( void ); - -int test( void ) -{ - int policy; - int result; - - policy = SCHED_RR; - policy = SCHED_FIFO; - policy = SCHED_OTHER; -#ifdef _POSIX_SPORADIC_SERVER - policy = SCHED_SPORADIC; -#endif - - result = sched_get_priority_max( policy ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/sched07.c b/testsuites/psxtests/psxhdrs/sched07.c deleted file mode 100644 index fbf4e09958..0000000000 --- a/testsuites/psxtests/psxhdrs/sched07.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_PRIORITY_SCHEDULING -#error "rtems is supposed to have sched_get_priority_min" -#endif - -int test( void ); - -int test( void ) -{ - int policy; - int result; - - policy = SCHED_RR; - policy = SCHED_FIFO; - policy = SCHED_OTHER; -#ifdef _POSIX_SPORADIC_SERVER - policy = SCHED_SPORADIC; -#endif - - result = sched_get_priority_min( policy ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/sched08.c b/testsuites/psxtests/psxhdrs/sched08.c deleted file mode 100644 index 5f2bd75f27..0000000000 --- a/testsuites/psxtests/psxhdrs/sched08.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_PRIORITY_SCHEDULING -#error "rtems is supposed to have sched_rr_get_interval" -#endif - -int test( void ); - -int test( void ) -{ - pid_t pid; - struct timespec interval; - int result; - - pid = 0; - - result = sched_rr_get_interval( pid, &interval ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal/pthread_sigmask.c b/testsuites/psxtests/psxhdrs/signal/pthread_sigmask.c new file mode 100644 index 0000000000..7a25895b23 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/signal/pthread_sigmask.c @@ -0,0 +1,41 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_THREADS +#define "rtems is supposed to have pthread_sigmask" +#endif + +int test( void ); + +int test( void ) +{ + int how; + sigset_t set; + sigset_t oset; + int result; + + how = SIG_BLOCK; + how = SIG_UNBLOCK; + how = SIG_SETMASK; + + (void) sigemptyset( &set ); + + result = pthread_sigmask( how, &set, &oset ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/signal/raise.c b/testsuites/psxtests/psxhdrs/signal/raise.c new file mode 100644 index 0000000000..bae84d06a2 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/signal/raise.c @@ -0,0 +1,31 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + int signal_number; + int result; + + signal_number = SIGALRM; + + result = raise( signal_number ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/signal/signal.c b/testsuites/psxtests/psxhdrs/signal/signal.c new file mode 100644 index 0000000000..266f50fa39 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/signal/signal.c @@ -0,0 +1,31 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + void (*signal_function_pointer)(int); + int signal_number; + + signal_number = SIGALRM; + + signal_function_pointer = signal( signal_number, SIG_IGN ); + + return (signal_function_pointer == SIG_ERR) ? -1 : 0; +} diff --git a/testsuites/psxtests/psxhdrs/signal/sigpending.c b/testsuites/psxtests/psxhdrs/signal/sigpending.c new file mode 100644 index 0000000000..16d4cf7404 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/signal/sigpending.c @@ -0,0 +1,31 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + sigset_t set; + int result; + + (void) sigemptyset( &set ); + + result = sigpending( &set ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/signal/sigprocmask.c b/testsuites/psxtests/psxhdrs/signal/sigprocmask.c new file mode 100644 index 0000000000..0c4a93cd30 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/signal/sigprocmask.c @@ -0,0 +1,37 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + int how; + sigset_t set; + sigset_t oset; + int result; + + how = SIG_BLOCK; + how = SIG_UNBLOCK; + how = SIG_SETMASK; + + (void) sigemptyset( &set ); + + result = sigprocmask( how, &set, &oset ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/signal/sigsuspend.c b/testsuites/psxtests/psxhdrs/signal/sigsuspend.c new file mode 100644 index 0000000000..635d2ef013 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/signal/sigsuspend.c @@ -0,0 +1,31 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + sigset_t sigmask; + int result; + + (void) sigemptyset( &sigmask ); + + result = sigsuspend( &sigmask ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/signal/sigtimedwait.c b/testsuites/psxtests/psxhdrs/signal/sigtimedwait.c new file mode 100644 index 0000000000..ca2eee72f9 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/signal/sigtimedwait.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + sigset_t set; + siginfo_t info; + struct timespec timeout; + int result; + + sigemptyset( &set ); + + result = sigtimedwait( &set, &info, &timeout ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/signal/sigwait.c b/testsuites/psxtests/psxhdrs/signal/sigwait.c new file mode 100644 index 0000000000..16050e88bd --- /dev/null +++ b/testsuites/psxtests/psxhdrs/signal/sigwait.c @@ -0,0 +1,32 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + sigset_t set; + int sig; + int result; + + (void) sigemptyset( &set ); + + result = sigwait( &set, &sig ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/signal/sigwaitinfo.c b/testsuites/psxtests/psxhdrs/signal/sigwaitinfo.c new file mode 100644 index 0000000000..d6e64d7b20 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/signal/sigwaitinfo.c @@ -0,0 +1,32 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + sigset_t set; + siginfo_t info; + int result; + + (void) sigemptyset( &set ); + + result = sigwaitinfo( &set, &info ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/signal01.c b/testsuites/psxtests/psxhdrs/signal01.c deleted file mode 100644 index 245e025574..0000000000 --- a/testsuites/psxtests/psxhdrs/signal01.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - sigset_t signal_set; - int signal_number; - int result; - - signal_number = SIGALRM; - - result = sigaddset( &signal_set, signal_number ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal02.c b/testsuites/psxtests/psxhdrs/signal02.c deleted file mode 100644 index c62f95c682..0000000000 --- a/testsuites/psxtests/psxhdrs/signal02.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - sigset_t signal_set; - int signal_number; - int result; - - signal_number = SIGALRM; - - result = sigdelset( &signal_set, signal_number ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal03.c b/testsuites/psxtests/psxhdrs/signal03.c deleted file mode 100644 index e2f552e268..0000000000 --- a/testsuites/psxtests/psxhdrs/signal03.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - sigset_t signal_set; - int result; - - result = sigfillset( &signal_set ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal04.c b/testsuites/psxtests/psxhdrs/signal04.c deleted file mode 100644 index e2ae23e852..0000000000 --- a/testsuites/psxtests/psxhdrs/signal04.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - sigset_t signal_set; - int signal_number; - int result; - - signal_number = SIGALRM; - - result = sigismember( &signal_set, signal_number ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal05.c b/testsuites/psxtests/psxhdrs/signal05.c deleted file mode 100644 index 89325639c7..0000000000 --- a/testsuites/psxtests/psxhdrs/signal05.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - sigset_t signal_set; - int result; - - result = sigemptyset( &signal_set ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal06.c b/testsuites/psxtests/psxhdrs/signal06.c deleted file mode 100644 index a391a1430d..0000000000 --- a/testsuites/psxtests/psxhdrs/signal06.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - int signal_number; - struct sigaction act; - struct sigaction oact; - int result; - - signal_number = SIGALRM; - - /* - * Really should not reference sa_handler and sa_signction simultaneously. - */ - - act.sa_handler = SIG_DFL; - act.sa_handler = SIG_IGN; - act.sa_mask = 0; - act.sa_flags = SA_NOCLDSTOP; - act.sa_flags = SA_SIGINFO; - act.sa_sigaction = NULL; - - result = sigaction( signal_number, &act, &oact ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal07.c b/testsuites/psxtests/psxhdrs/signal07.c deleted file mode 100644 index 52a53ca35c..0000000000 --- a/testsuites/psxtests/psxhdrs/signal07.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_kill" -#endif - -int test( void ); - -int test( void ) -{ - pthread_t thread; - int signal_number; - int result; - - thread = 0; - signal_number = SIGALRM; - - result = pthread_kill( thread, signal_number ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal08.c b/testsuites/psxtests/psxhdrs/signal08.c deleted file mode 100644 index 730a23b4f9..0000000000 --- a/testsuites/psxtests/psxhdrs/signal08.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#error "rtems is supposed to have pthread_sigmask" -#endif - -int test( void ); - -int test( void ) -{ - int how; - sigset_t set; - sigset_t oset; - int result; - - how = SIG_BLOCK; - how = SIG_UNBLOCK; - how = SIG_SETMASK; - - result = pthread_sigmask( how, &set, &oset ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal09.c b/testsuites/psxtests/psxhdrs/signal09.c deleted file mode 100644 index 263750c4cb..0000000000 --- a/testsuites/psxtests/psxhdrs/signal09.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include - -int test( void ); - -int test( void ) -{ - pid_t pid; - int signal_number; - int result; - - pid = 0; - signal_number = SIGALRM; - - result = kill( pid, signal_number ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal10.c b/testsuites/psxtests/psxhdrs/signal10.c deleted file mode 100644 index ee5f036a5c..0000000000 --- a/testsuites/psxtests/psxhdrs/signal10.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - sigset_t set; - int sig; - int result; - - result = sigwait( &set, &sig ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal11.c b/testsuites/psxtests/psxhdrs/signal11.c deleted file mode 100644 index bae84d06a2..0000000000 --- a/testsuites/psxtests/psxhdrs/signal11.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - int signal_number; - int result; - - signal_number = SIGALRM; - - result = raise( signal_number ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal12.c b/testsuites/psxtests/psxhdrs/signal12.c deleted file mode 100644 index 266f50fa39..0000000000 --- a/testsuites/psxtests/psxhdrs/signal12.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - void (*signal_function_pointer)(int); - int signal_number; - - signal_number = SIGALRM; - - signal_function_pointer = signal( signal_number, SIG_IGN ); - - return (signal_function_pointer == SIG_ERR) ? -1 : 0; -} diff --git a/testsuites/psxtests/psxhdrs/signal13.c b/testsuites/psxtests/psxhdrs/signal13.c deleted file mode 100644 index 0c4a93cd30..0000000000 --- a/testsuites/psxtests/psxhdrs/signal13.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - int how; - sigset_t set; - sigset_t oset; - int result; - - how = SIG_BLOCK; - how = SIG_UNBLOCK; - how = SIG_SETMASK; - - (void) sigemptyset( &set ); - - result = sigprocmask( how, &set, &oset ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal14.c b/testsuites/psxtests/psxhdrs/signal14.c deleted file mode 100644 index 16d4cf7404..0000000000 --- a/testsuites/psxtests/psxhdrs/signal14.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - sigset_t set; - int result; - - (void) sigemptyset( &set ); - - result = sigpending( &set ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal15.c b/testsuites/psxtests/psxhdrs/signal15.c deleted file mode 100644 index 635d2ef013..0000000000 --- a/testsuites/psxtests/psxhdrs/signal15.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - sigset_t sigmask; - int result; - - (void) sigemptyset( &sigmask ); - - result = sigsuspend( &sigmask ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal16.c b/testsuites/psxtests/psxhdrs/signal16.c deleted file mode 100644 index 7a25895b23..0000000000 --- a/testsuites/psxtests/psxhdrs/signal16.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_THREADS -#define "rtems is supposed to have pthread_sigmask" -#endif - -int test( void ); - -int test( void ) -{ - int how; - sigset_t set; - sigset_t oset; - int result; - - how = SIG_BLOCK; - how = SIG_UNBLOCK; - how = SIG_SETMASK; - - (void) sigemptyset( &set ); - - result = pthread_sigmask( how, &set, &oset ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal17.c b/testsuites/psxtests/psxhdrs/signal17.c deleted file mode 100644 index d6e64d7b20..0000000000 --- a/testsuites/psxtests/psxhdrs/signal17.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - sigset_t set; - siginfo_t info; - int result; - - (void) sigemptyset( &set ); - - result = sigwaitinfo( &set, &info ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal18.c b/testsuites/psxtests/psxhdrs/signal18.c deleted file mode 100644 index ca2eee72f9..0000000000 --- a/testsuites/psxtests/psxhdrs/signal18.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - sigset_t set; - siginfo_t info; - struct timespec timeout; - int result; - - sigemptyset( &set ); - - result = sigtimedwait( &set, &info, &timeout ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal19.c b/testsuites/psxtests/psxhdrs/signal19.c deleted file mode 100644 index 16050e88bd..0000000000 --- a/testsuites/psxtests/psxhdrs/signal19.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - sigset_t set; - int sig; - int result; - - (void) sigemptyset( &set ); - - result = sigwait( &set, &sig ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal20.c b/testsuites/psxtests/psxhdrs/signal20.c deleted file mode 100644 index 7ca0e3cae7..0000000000 --- a/testsuites/psxtests/psxhdrs/signal20.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - unsigned int seconds; - unsigned int result; - - seconds = 10; - - result = alarm( seconds ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal21.c b/testsuites/psxtests/psxhdrs/signal21.c deleted file mode 100644 index 643be398cf..0000000000 --- a/testsuites/psxtests/psxhdrs/signal21.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - int result; - - result = pause(); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal22.c b/testsuites/psxtests/psxhdrs/signal22.c deleted file mode 100644 index aca31da98d..0000000000 --- a/testsuites/psxtests/psxhdrs/signal22.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - unsigned int seconds; - unsigned int result; - - seconds = 10; - - result = sleep( seconds ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/signal23.c b/testsuites/psxtests/psxhdrs/signal23.c deleted file mode 100644 index bec71d03b3..0000000000 --- a/testsuites/psxtests/psxhdrs/signal23.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -/* FIXME: POSIX.1-2001 marks ualarm() as obsolete. - * POSIX.1-2008 removes the specification of ualarm(). */ - -useconds_t _EXFUN(ualarm, (useconds_t __useconds, useconds_t __interval)); -int test( void ); - -int test( void ) -{ - useconds_t useconds; - useconds_t interval; - useconds_t result; - - useconds = 10; - interval = 10; - - result = ualarm( useconds, interval ); - - return (result == 0) ? 0 : -1; -} diff --git a/testsuites/psxtests/psxhdrs/sync01.c b/testsuites/psxtests/psxhdrs/sync01.c deleted file mode 100644 index 188a91e5e0..0000000000 --- a/testsuites/psxtests/psxhdrs/sync01.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - int fd; - int result; - - fd = 4; - result = fsync( fd ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/sync02.c b/testsuites/psxtests/psxhdrs/sync02.c deleted file mode 100644 index 4a0f9a503d..0000000000 --- a/testsuites/psxtests/psxhdrs/sync02.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - int fd; - int result; - - fd = 4; - result = fdatasync( fd ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/sync03.c b/testsuites/psxtests/psxhdrs/sync03.c deleted file mode 100644 index bc6992c01c..0000000000 --- a/testsuites/psxtests/psxhdrs/sync03.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -void test( void ); - -void test( void ) -{ - sync(); -} diff --git a/testsuites/psxtests/psxhdrs/time/asctime.c b/testsuites/psxtests/psxhdrs/time/asctime.c new file mode 100644 index 0000000000..201bac0c7f --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/asctime.c @@ -0,0 +1,29 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + char *buffer; + struct tm timestruct; + + buffer = asctime( ×truct ); + + return (buffer != NULL); +} diff --git a/testsuites/psxtests/psxhdrs/time/asctime_r.c b/testsuites/psxtests/psxhdrs/time/asctime_r.c new file mode 100644 index 0000000000..574795ca1d --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/asctime_r.c @@ -0,0 +1,30 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + char *buffer_pointer; + struct tm timestruct; + char buffer[ 80 ]; + + buffer_pointer = asctime_r( ×truct, buffer ); + + return (buffer_pointer != NULL); +} diff --git a/testsuites/psxtests/psxhdrs/time/clock.c b/testsuites/psxtests/psxhdrs/time/clock.c new file mode 100644 index 0000000000..3f7a50dc13 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/clock.c @@ -0,0 +1,28 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + clock_t clock_ticks; + + clock_ticks = clock(); + + return (clock_ticks != -1); +} diff --git a/testsuites/psxtests/psxhdrs/time/clock_getcpuclockid.c b/testsuites/psxtests/psxhdrs/time/clock_getcpuclockid.c new file mode 100644 index 0000000000..066912e9b8 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/clock_getcpuclockid.c @@ -0,0 +1,34 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_CPUTIME +#error "rtems is supposed to have clock_getcpuclockid" +#endif + +int test( void ); + +int test( void ) +{ + pid_t pid = 0; + clockid_t clock_id; + int result; + + result = clock_getcpuclockid( pid, &clock_id ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/time/clock_getenable_attr.c b/testsuites/psxtests/psxhdrs/time/clock_getenable_attr.c new file mode 100644 index 0000000000..d3c73ba291 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/clock_getenable_attr.c @@ -0,0 +1,37 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_CPUTIME +#error "rtems is supposed to have clock_getenable_attr" +#endif +#ifndef _POSIX_THREAD_CPUTIME +#error "rtems is supposed to have clock_getenable_attr" +#endif + +int test( void ); + +int test( void ) +{ + clockid_t clock_id = 0; + int attr; + int result; + + result = clock_getenable_attr( clock_id, &attr ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/time/clock_getres.c b/testsuites/psxtests/psxhdrs/time/clock_getres.c new file mode 100644 index 0000000000..d298aec9fd --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/clock_getres.c @@ -0,0 +1,34 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_TIMERS +#error "rtems is supposed to have clock_getres" +#endif + +int test( void ); + +int test( void ) +{ + clockid_t clock_id = 0; + struct timespec res; + int result; + + result = clock_getres( clock_id, &res ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/time/clock_gettime.c b/testsuites/psxtests/psxhdrs/time/clock_gettime.c new file mode 100644 index 0000000000..a12f0247d5 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/clock_gettime.c @@ -0,0 +1,34 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_TIMERS +#error "rtems is supposed to have clock_gettime" +#endif + +int test( void ); + +int test( void ) +{ + clockid_t clock_id = 0; + struct timespec tp; + int result; + + result = clock_gettime( clock_id, &tp ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/time/clock_setenable_attr.c b/testsuites/psxtests/psxhdrs/time/clock_setenable_attr.c new file mode 100644 index 0000000000..8d0bd70eb6 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/clock_setenable_attr.c @@ -0,0 +1,40 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_CPUTIME +#error "rtems is supposed to have clock_setenable_attr" +#endif +#ifndef _POSIX_THREAD_CPUTIME +#error "rtems is supposed to have clock_setenable_attr" +#endif + +int test( void ); + +int test( void ) +{ + clockid_t clock_id = 0; + int attr; + int result; + + attr = CLOCK_ENABLED; + attr = CLOCK_DISABLED; + + result = clock_setenable_attr( clock_id, attr ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/time/clock_settime.c b/testsuites/psxtests/psxhdrs/time/clock_settime.c new file mode 100644 index 0000000000..49a713d449 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/clock_settime.c @@ -0,0 +1,34 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_TIMERS +#error "rtems is supposed to have clock_settime" +#endif + +int test( void ); + +int test( void ) +{ + clockid_t clock_id = 0; + struct timespec tp; + int result; + + result = clock_settime( clock_id, &tp ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/time/ctime.c b/testsuites/psxtests/psxhdrs/time/ctime.c new file mode 100644 index 0000000000..7091a66d16 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/ctime.c @@ -0,0 +1,29 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + char *buffer; + time_t time; + + buffer = ctime( &time ); + + return (buffer != NULL); +} diff --git a/testsuites/psxtests/psxhdrs/time/ctime_r.c b/testsuites/psxtests/psxhdrs/time/ctime_r.c new file mode 100644 index 0000000000..2f9156fb4f --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/ctime_r.c @@ -0,0 +1,30 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + char *buffer_pointer; + char buffer[ 80 ]; + time_t time; + + buffer_pointer = ctime_r( &time, buffer ); + + return (buffer_pointer != NULL); +} diff --git a/testsuites/psxtests/psxhdrs/time/difftime.c b/testsuites/psxtests/psxhdrs/time/difftime.c new file mode 100644 index 0000000000..7bc58c1e2a --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/difftime.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + time_t time1; + time_t time2; + double difference; + + time1 = 0; + time2 = 0; + + difference = difftime( time1, time2 ); + + return (difference != 0.0); +} diff --git a/testsuites/psxtests/psxhdrs/time/gmtime.c b/testsuites/psxtests/psxhdrs/time/gmtime.c new file mode 100644 index 0000000000..229ba12734 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/gmtime.c @@ -0,0 +1,29 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + time_t time; + struct tm *timestruct; + + timestruct = gmtime( &time ); + + return (timestruct != NULL); +} diff --git a/testsuites/psxtests/psxhdrs/time/gmtime_r.c b/testsuites/psxtests/psxhdrs/time/gmtime_r.c new file mode 100644 index 0000000000..19a94a1317 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/gmtime_r.c @@ -0,0 +1,30 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + time_t time; + struct tm *timestruct_pointer; + struct tm timestruct; + + timestruct_pointer = gmtime_r( &time, ×truct ); + + return (timestruct_pointer != NULL); +} diff --git a/testsuites/psxtests/psxhdrs/time/localtime.c b/testsuites/psxtests/psxhdrs/time/localtime.c new file mode 100644 index 0000000000..0504829cd1 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/localtime.c @@ -0,0 +1,29 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + time_t time; + struct tm *timestruct; + + timestruct = localtime( &time ); + + return (timestruct != NULL); +} diff --git a/testsuites/psxtests/psxhdrs/time/localtime_r.c b/testsuites/psxtests/psxhdrs/time/localtime_r.c new file mode 100644 index 0000000000..340a2757f6 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/localtime_r.c @@ -0,0 +1,30 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + time_t time; + struct tm *timestruct_pointer; + struct tm timestruct; + + timestruct_pointer = localtime_r( &time, ×truct ); + + return (timestruct_pointer != NULL); +} diff --git a/testsuites/psxtests/psxhdrs/time/mktime.c b/testsuites/psxtests/psxhdrs/time/mktime.c new file mode 100644 index 0000000000..56b835fc8a --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/mktime.c @@ -0,0 +1,39 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + struct tm timestruct; + time_t time_encoded; + + timestruct.tm_sec = 0; + timestruct.tm_min = 0; + timestruct.tm_hour = 0; + timestruct.tm_mday = 1; + timestruct.tm_mon = 0; + timestruct.tm_year = 0; + timestruct.tm_wday = 0; + timestruct.tm_yday = 0; + timestruct.tm_isdst = 0; + + time_encoded = mktime( ×truct ); + + return (time_encoded != -1); +} diff --git a/testsuites/psxtests/psxhdrs/time/nanosleep.c b/testsuites/psxtests/psxhdrs/time/nanosleep.c new file mode 100644 index 0000000000..bd8bb1ed34 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/nanosleep.c @@ -0,0 +1,36 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_TIMERS +#error "rtems is supposed to have nanosleep" +#endif + +int test( void ); + +int test( void ) +{ + struct timespec rqtp; + struct timespec rmtp; + int result; + + rqtp.tv_sec = 0; + rqtp.tv_nsec = 0; + result = nanosleep( &rqtp, &rmtp ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/time/strftime.c b/testsuites/psxtests/psxhdrs/time/strftime.c new file mode 100644 index 0000000000..20b5922b41 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/strftime.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + size_t length; + size_t max_length; + char buffer[ 80 ]; + struct tm timestruct; + + max_length = sizeof( buffer ); + + length = strftime( buffer, max_length, "%A", ×truct ); + + return (length != 0); +} diff --git a/testsuites/psxtests/psxhdrs/time/time.c b/testsuites/psxtests/psxhdrs/time/time.c new file mode 100644 index 0000000000..c12e09ebf2 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/time.c @@ -0,0 +1,28 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + time_t new_time; + + new_time = time( &new_time ); + + return (new_time != -1); +} diff --git a/testsuites/psxtests/psxhdrs/time/timer_create.c b/testsuites/psxtests/psxhdrs/time/timer_create.c new file mode 100644 index 0000000000..b60c819420 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/timer_create.c @@ -0,0 +1,42 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_TIMERS +#error "rtems is supposed to have timer_create" +#endif + +int test( void ); + +int test( void ) +{ + clockid_t clock_id = 0; + timer_t timerid = 0; + struct sigevent evp; + int result; + + evp.sigev_notify = SIGEV_NONE; + evp.sigev_notify = SIGEV_SIGNAL; + evp.sigev_notify = SIGEV_THREAD; + evp.sigev_signo = SIGALRM; + evp.sigev_value.sival_int = 0; + evp.sigev_value.sival_ptr = NULL; + + result = timer_create( clock_id, &evp, &timerid ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/time/timer_delete.c b/testsuites/psxtests/psxhdrs/time/timer_delete.c new file mode 100644 index 0000000000..0a95e29139 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/timer_delete.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_TIMERS +#error "rtems is supposed to have timer_delete" +#endif + +int test( void ); + +int test( void ) +{ + timer_t timerid = 0; + int result; + + result = timer_delete( timerid ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/time/timer_getoverrun.c b/testsuites/psxtests/psxhdrs/time/timer_getoverrun.c new file mode 100644 index 0000000000..1bb9b1a887 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/timer_getoverrun.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_TIMERS +#error "rtems is supposed to have timer_getoverrun" +#endif + +int test( void ); + +int test( void ) +{ + timer_t timerid = 0; + int result; + + result = timer_getoverrun( timerid ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/time/timer_gettime.c b/testsuites/psxtests/psxhdrs/time/timer_gettime.c new file mode 100644 index 0000000000..ee265743c0 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/timer_gettime.c @@ -0,0 +1,34 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_TIMERS +#error "rtems is supposed to have timer_gettime" +#endif + +int test( void ); + +int test( void ) +{ + timer_t timerid = 0; + struct itimerspec value; + int result; + + result = timer_gettime( timerid, &value ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/time/timer_settime.c b/testsuites/psxtests/psxhdrs/time/timer_settime.c new file mode 100644 index 0000000000..d5981f7bca --- /dev/null +++ b/testsuites/psxtests/psxhdrs/time/timer_settime.c @@ -0,0 +1,44 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#ifndef _POSIX_TIMERS +#error "rtems is supposed to have timer_settime" +#endif + +int test( void ); + +int test( void ) +{ + timer_t timerid = 0; + int flags; + struct itimerspec value; + struct itimerspec ovalue; + int result; + + value.it_interval.tv_sec = 0; + value.it_interval.tv_nsec = 0; + value.it_value.tv_sec = 0; + value.it_value.tv_nsec = 0; + + flags = TIMER_ABSTIME; + flags = CLOCK_REALTIME; + + result = timer_settime( timerid, flags, &value, &ovalue ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/time01.c b/testsuites/psxtests/psxhdrs/time01.c deleted file mode 100644 index 3f7a50dc13..0000000000 --- a/testsuites/psxtests/psxhdrs/time01.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - clock_t clock_ticks; - - clock_ticks = clock(); - - return (clock_ticks != -1); -} diff --git a/testsuites/psxtests/psxhdrs/time02.c b/testsuites/psxtests/psxhdrs/time02.c deleted file mode 100644 index 7bc58c1e2a..0000000000 --- a/testsuites/psxtests/psxhdrs/time02.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - time_t time1; - time_t time2; - double difference; - - time1 = 0; - time2 = 0; - - difference = difftime( time1, time2 ); - - return (difference != 0.0); -} diff --git a/testsuites/psxtests/psxhdrs/time03.c b/testsuites/psxtests/psxhdrs/time03.c deleted file mode 100644 index 56b835fc8a..0000000000 --- a/testsuites/psxtests/psxhdrs/time03.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - struct tm timestruct; - time_t time_encoded; - - timestruct.tm_sec = 0; - timestruct.tm_min = 0; - timestruct.tm_hour = 0; - timestruct.tm_mday = 1; - timestruct.tm_mon = 0; - timestruct.tm_year = 0; - timestruct.tm_wday = 0; - timestruct.tm_yday = 0; - timestruct.tm_isdst = 0; - - time_encoded = mktime( ×truct ); - - return (time_encoded != -1); -} diff --git a/testsuites/psxtests/psxhdrs/time04.c b/testsuites/psxtests/psxhdrs/time04.c deleted file mode 100644 index c12e09ebf2..0000000000 --- a/testsuites/psxtests/psxhdrs/time04.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - time_t new_time; - - new_time = time( &new_time ); - - return (new_time != -1); -} diff --git a/testsuites/psxtests/psxhdrs/time05.c b/testsuites/psxtests/psxhdrs/time05.c deleted file mode 100644 index 20b5922b41..0000000000 --- a/testsuites/psxtests/psxhdrs/time05.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - size_t length; - size_t max_length; - char buffer[ 80 ]; - struct tm timestruct; - - max_length = sizeof( buffer ); - - length = strftime( buffer, max_length, "%A", ×truct ); - - return (length != 0); -} diff --git a/testsuites/psxtests/psxhdrs/time06.c b/testsuites/psxtests/psxhdrs/time06.c deleted file mode 100644 index 201bac0c7f..0000000000 --- a/testsuites/psxtests/psxhdrs/time06.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - char *buffer; - struct tm timestruct; - - buffer = asctime( ×truct ); - - return (buffer != NULL); -} diff --git a/testsuites/psxtests/psxhdrs/time07.c b/testsuites/psxtests/psxhdrs/time07.c deleted file mode 100644 index 7091a66d16..0000000000 --- a/testsuites/psxtests/psxhdrs/time07.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - char *buffer; - time_t time; - - buffer = ctime( &time ); - - return (buffer != NULL); -} diff --git a/testsuites/psxtests/psxhdrs/time08.c b/testsuites/psxtests/psxhdrs/time08.c deleted file mode 100644 index 229ba12734..0000000000 --- a/testsuites/psxtests/psxhdrs/time08.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - time_t time; - struct tm *timestruct; - - timestruct = gmtime( &time ); - - return (timestruct != NULL); -} diff --git a/testsuites/psxtests/psxhdrs/time09.c b/testsuites/psxtests/psxhdrs/time09.c deleted file mode 100644 index 0504829cd1..0000000000 --- a/testsuites/psxtests/psxhdrs/time09.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - time_t time; - struct tm *timestruct; - - timestruct = localtime( &time ); - - return (timestruct != NULL); -} diff --git a/testsuites/psxtests/psxhdrs/time10.c b/testsuites/psxtests/psxhdrs/time10.c deleted file mode 100644 index 574795ca1d..0000000000 --- a/testsuites/psxtests/psxhdrs/time10.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - char *buffer_pointer; - struct tm timestruct; - char buffer[ 80 ]; - - buffer_pointer = asctime_r( ×truct, buffer ); - - return (buffer_pointer != NULL); -} diff --git a/testsuites/psxtests/psxhdrs/time11.c b/testsuites/psxtests/psxhdrs/time11.c deleted file mode 100644 index 2f9156fb4f..0000000000 --- a/testsuites/psxtests/psxhdrs/time11.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - char *buffer_pointer; - char buffer[ 80 ]; - time_t time; - - buffer_pointer = ctime_r( &time, buffer ); - - return (buffer_pointer != NULL); -} diff --git a/testsuites/psxtests/psxhdrs/time12.c b/testsuites/psxtests/psxhdrs/time12.c deleted file mode 100644 index 19a94a1317..0000000000 --- a/testsuites/psxtests/psxhdrs/time12.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - time_t time; - struct tm *timestruct_pointer; - struct tm timestruct; - - timestruct_pointer = gmtime_r( &time, ×truct ); - - return (timestruct_pointer != NULL); -} diff --git a/testsuites/psxtests/psxhdrs/time13.c b/testsuites/psxtests/psxhdrs/time13.c deleted file mode 100644 index 340a2757f6..0000000000 --- a/testsuites/psxtests/psxhdrs/time13.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - time_t time; - struct tm *timestruct_pointer; - struct tm timestruct; - - timestruct_pointer = localtime_r( &time, ×truct ); - - return (timestruct_pointer != NULL); -} diff --git a/testsuites/psxtests/psxhdrs/timer01.c b/testsuites/psxtests/psxhdrs/timer01.c deleted file mode 100644 index b60c819420..0000000000 --- a/testsuites/psxtests/psxhdrs/timer01.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have timer_create" -#endif - -int test( void ); - -int test( void ) -{ - clockid_t clock_id = 0; - timer_t timerid = 0; - struct sigevent evp; - int result; - - evp.sigev_notify = SIGEV_NONE; - evp.sigev_notify = SIGEV_SIGNAL; - evp.sigev_notify = SIGEV_THREAD; - evp.sigev_signo = SIGALRM; - evp.sigev_value.sival_int = 0; - evp.sigev_value.sival_ptr = NULL; - - result = timer_create( clock_id, &evp, &timerid ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/timer02.c b/testsuites/psxtests/psxhdrs/timer02.c deleted file mode 100644 index 0a95e29139..0000000000 --- a/testsuites/psxtests/psxhdrs/timer02.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have timer_delete" -#endif - -int test( void ); - -int test( void ) -{ - timer_t timerid = 0; - int result; - - result = timer_delete( timerid ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/timer03.c b/testsuites/psxtests/psxhdrs/timer03.c deleted file mode 100644 index d5981f7bca..0000000000 --- a/testsuites/psxtests/psxhdrs/timer03.c +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have timer_settime" -#endif - -int test( void ); - -int test( void ) -{ - timer_t timerid = 0; - int flags; - struct itimerspec value; - struct itimerspec ovalue; - int result; - - value.it_interval.tv_sec = 0; - value.it_interval.tv_nsec = 0; - value.it_value.tv_sec = 0; - value.it_value.tv_nsec = 0; - - flags = TIMER_ABSTIME; - flags = CLOCK_REALTIME; - - result = timer_settime( timerid, flags, &value, &ovalue ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/timer04.c b/testsuites/psxtests/psxhdrs/timer04.c deleted file mode 100644 index ee265743c0..0000000000 --- a/testsuites/psxtests/psxhdrs/timer04.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have timer_gettime" -#endif - -int test( void ); - -int test( void ) -{ - timer_t timerid = 0; - struct itimerspec value; - int result; - - result = timer_gettime( timerid, &value ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/timer05.c b/testsuites/psxtests/psxhdrs/timer05.c deleted file mode 100644 index 1bb9b1a887..0000000000 --- a/testsuites/psxtests/psxhdrs/timer05.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have timer_getoverrun" -#endif - -int test( void ); - -int test( void ) -{ - timer_t timerid = 0; - int result; - - result = timer_getoverrun( timerid ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/timer06.c b/testsuites/psxtests/psxhdrs/timer06.c deleted file mode 100644 index bd8bb1ed34..0000000000 --- a/testsuites/psxtests/psxhdrs/timer06.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -#ifndef _POSIX_TIMERS -#error "rtems is supposed to have nanosleep" -#endif - -int test( void ); - -int test( void ) -{ - struct timespec rqtp; - struct timespec rmtp; - int result; - - rqtp.tv_sec = 0; - rqtp.tv_nsec = 0; - result = nanosleep( &rqtp, &rmtp ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/timer07.c b/testsuites/psxtests/psxhdrs/timer07.c deleted file mode 100644 index f4125d1432..0000000000 --- a/testsuites/psxtests/psxhdrs/timer07.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This test file is used to verify that the header files associated with - * invoking this function are correct. - * - * COPYRIGHT (c) 1989-2009. - * On-Line Applications Research Corporation (OAR). - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include - -int test( void ); - -int test( void ) -{ - useconds_t usec; - unsigned result; - - usec = 0; - result = usleep( usec ); - - return result; -} diff --git a/testsuites/psxtests/psxhdrs/unistd/alarm.c b/testsuites/psxtests/psxhdrs/unistd/alarm.c new file mode 100644 index 0000000000..7ca0e3cae7 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/alarm.c @@ -0,0 +1,31 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + unsigned int seconds; + unsigned int result; + + seconds = 10; + + result = alarm( seconds ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/fdatasync.c b/testsuites/psxtests/psxhdrs/unistd/fdatasync.c new file mode 100644 index 0000000000..4a0f9a503d --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/fdatasync.c @@ -0,0 +1,30 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + int fd; + int result; + + fd = 4; + result = fdatasync( fd ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/fsync.c b/testsuites/psxtests/psxhdrs/unistd/fsync.c new file mode 100644 index 0000000000..188a91e5e0 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/fsync.c @@ -0,0 +1,30 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + int fd; + int result; + + fd = 4; + result = fsync( fd ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/getegid.c b/testsuites/psxtests/psxhdrs/unistd/getegid.c new file mode 100644 index 0000000000..c4698badeb --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/getegid.c @@ -0,0 +1,29 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +int test( void ); + +int test( void ) +{ + gid_t gid; + + gid = getegid(); + + return gid; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/geteuid.c b/testsuites/psxtests/psxhdrs/unistd/geteuid.c new file mode 100644 index 0000000000..beffd5ae6c --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/geteuid.c @@ -0,0 +1,29 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +int test( void ); + +int test( void ) +{ + uid_t uid; + + uid = geteuid(); + + return uid; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/getgid.c b/testsuites/psxtests/psxhdrs/unistd/getgid.c new file mode 100644 index 0000000000..515c7144a4 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/getgid.c @@ -0,0 +1,29 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +int test( void ); + +int test( void ) +{ + gid_t gid; + + gid = getgid(); + + return gid; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/getgroups.c b/testsuites/psxtests/psxhdrs/unistd/getgroups.c new file mode 100644 index 0000000000..4402251914 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/getgroups.c @@ -0,0 +1,33 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +int test( void ); + +int test( void ) +{ + gid_t grouplist[ 20 ]; + int gidsetsize; + int result; + + gidsetsize = 20; + + result = getgroups( gidsetsize, grouplist ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/getlogin.c b/testsuites/psxtests/psxhdrs/unistd/getlogin.c new file mode 100644 index 0000000000..e7ace225e7 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/getlogin.c @@ -0,0 +1,29 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +int test( void ); + +int test( void ) +{ + char *loginname; + + loginname = getlogin(); + + return (loginname == NULL) ? -1 : 0; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/getlogin_r.c b/testsuites/psxtests/psxhdrs/unistd/getlogin_r.c new file mode 100644 index 0000000000..78d6de1d05 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/getlogin_r.c @@ -0,0 +1,31 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include /* for LOGIN_NAME_MAX */ + +int test( void ); + +int test( void ) +{ + char loginnamebuffer[ LOGIN_NAME_MAX ]; + int result; + + result = getlogin_r( loginnamebuffer, LOGIN_NAME_MAX ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/getpgrp.c b/testsuites/psxtests/psxhdrs/unistd/getpgrp.c new file mode 100644 index 0000000000..fc11fe2171 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/getpgrp.c @@ -0,0 +1,29 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +int test( void ); + +int test( void ) +{ + pid_t pgrp; + + pgrp = getpgrp(); + + return (pgrp == -1) ? -1 : 0; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/getpid.c b/testsuites/psxtests/psxhdrs/unistd/getpid.c new file mode 100644 index 0000000000..67505c6fe7 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/getpid.c @@ -0,0 +1,29 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +int test( void ); + +int test( void ) +{ + pid_t pid; + + pid = getpid(); + + return pid; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/getppid.c b/testsuites/psxtests/psxhdrs/unistd/getppid.c new file mode 100644 index 0000000000..1ac195208f --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/getppid.c @@ -0,0 +1,29 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +int test( void ); + +int test( void ) +{ + pid_t pid; + + pid = getppid(); + + return pid; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/getuid.c b/testsuites/psxtests/psxhdrs/unistd/getuid.c new file mode 100644 index 0000000000..7a08340e83 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/getuid.c @@ -0,0 +1,29 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +int test( void ); + +int test( void ) +{ + uid_t uid; + + uid = getuid(); + + return uid; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/pause.c b/testsuites/psxtests/psxhdrs/unistd/pause.c new file mode 100644 index 0000000000..643be398cf --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/pause.c @@ -0,0 +1,28 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + int result; + + result = pause(); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/setgid.c b/testsuites/psxtests/psxhdrs/unistd/setgid.c new file mode 100644 index 0000000000..ac3be6af96 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/setgid.c @@ -0,0 +1,32 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +int test( void ); + +int test( void ) +{ + gid_t gid; + int result; + + gid = 0; + + result = setgid( gid ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/setpgid.c b/testsuites/psxtests/psxhdrs/unistd/setpgid.c new file mode 100644 index 0000000000..daed07f6b1 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/setpgid.c @@ -0,0 +1,31 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +int test( void ); + +int test( void ) +{ + pid_t pid = 0; + pid_t pgid = 0; + int result; + + result = setpgid( pid, pgid ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/setsid.c b/testsuites/psxtests/psxhdrs/unistd/setsid.c new file mode 100644 index 0000000000..7bb043453e --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/setsid.c @@ -0,0 +1,29 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +int test( void ); + +int test( void ) +{ + pid_t pid; + + pid = setsid(); + + return (pid == -1) ? -1 : 0; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/setuid.c b/testsuites/psxtests/psxhdrs/unistd/setuid.c new file mode 100644 index 0000000000..28457edba8 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/setuid.c @@ -0,0 +1,32 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +int test( void ); + +int test( void ) +{ + uid_t uid; + int result; + + uid = 0; + + result = setuid( uid ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/sleep.c b/testsuites/psxtests/psxhdrs/unistd/sleep.c new file mode 100644 index 0000000000..aca31da98d --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/sleep.c @@ -0,0 +1,31 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + unsigned int seconds; + unsigned int result; + + seconds = 10; + + result = sleep( seconds ); + + return result; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/sync.c b/testsuites/psxtests/psxhdrs/unistd/sync.c new file mode 100644 index 0000000000..bc6992c01c --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/sync.c @@ -0,0 +1,24 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +void test( void ); + +void test( void ) +{ + sync(); +} diff --git a/testsuites/psxtests/psxhdrs/unistd/ualarm.c b/testsuites/psxtests/psxhdrs/unistd/ualarm.c new file mode 100644 index 0000000000..bec71d03b3 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/ualarm.c @@ -0,0 +1,37 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +/* FIXME: POSIX.1-2001 marks ualarm() as obsolete. + * POSIX.1-2008 removes the specification of ualarm(). */ + +useconds_t _EXFUN(ualarm, (useconds_t __useconds, useconds_t __interval)); +int test( void ); + +int test( void ) +{ + useconds_t useconds; + useconds_t interval; + useconds_t result; + + useconds = 10; + interval = 10; + + result = ualarm( useconds, interval ); + + return (result == 0) ? 0 : -1; +} diff --git a/testsuites/psxtests/psxhdrs/unistd/usleep.c b/testsuites/psxtests/psxhdrs/unistd/usleep.c new file mode 100644 index 0000000000..f4125d1432 --- /dev/null +++ b/testsuites/psxtests/psxhdrs/unistd/usleep.c @@ -0,0 +1,30 @@ +/* + * This test file is used to verify that the header files associated with + * invoking this function are correct. + * + * COPYRIGHT (c) 1989-2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +int test( void ); + +int test( void ) +{ + useconds_t usec; + unsigned result; + + usec = 0; + result = usleep( usec ); + + return result; +} -- cgit v1.2.3