Commit Graph

170 Commits

Author SHA1 Message Date
Joel Sherrill
5f92568509 2010-11-01 Alin Rus <alin.codejunkie@gmail.com>
* posix/include/rtems/posix/aio_misc.h, posix/src/aio_misc.c: Small
	fixes.
2010-11-01 17:32:53 +00:00
Ralf Corsepius
ec34180ff4 Remove. 2010-08-30 12:25:10 +00:00
Ralf Corsepius
6c22fa12cb 2010-08-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* posix/include/rtems/posix/aio_misc.h: Add decl for aio_request_queue.
	* posix/src/aio_misc.c: Add aio_request_queue.
2010-08-20 14:37:08 +00:00
Ralf Corsepius
0ca3af6b85 2010-08-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* posix/include/rtems/posix/aio_misc.h: Remove rtems_aio_request_s,
	rtems_aio_request_chain_s, rtems_aio_queue_s;
2010-08-20 13:32:28 +00:00
Ralf Corsepius
b27ec1e0d7 2010-08-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* posix/include/aio.h: Separate LIO-modes from LIO-opcodes (From
	freebsd).
2010-08-20 13:30:32 +00:00
Ralf Corsepius
a45e501813 2010-08-16 Alin Rus <alin.codejunkie@gmail.com>
* posix/include/aio.h: Add LIO_SYNC.
	* posix/include/rtems/posix/aio_misc.h: Add aio_request_queue,
	Cosmetics.
	* posix/src/aio_cancel.c, posix/src/aio_fsync.c, posix/src/aio_misc.c:
	Rework.
2010-08-20 09:08:05 +00:00
Ralf Corsepius
a218508230 2010-08-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* posix/include/rtems/posix/aio_misc.h: Remove
	rtems_aio_queue_s.size (Unused).
	* posix/src/aio_misc.c: Remove aio_request_queue.size.
	Cosmetics.
2010-08-16 14:09:38 +00:00
Ralf Corsepius
e501d79f46 2010-08-16 Alin Rus <alin.codejunkie@gmail.com>
* posix/include/aio.h: Extend struct aiocb.
	* posix/include/rtems/posix/aio_misc.h: New.
2010-08-16 05:39:59 +00:00
Ralf Corsepius
4685a5901f 2010-08-09 Ralf Corsépius <ralf.corsepius@rtems.org>
* posix/include/aio.h, posix/src/aio_return.c:
	Let aio_return return ssize_t (Mandated by POSIX).
2010-08-09 07:33:58 +00:00
Joel Sherrill
77c330ce3d 2010-07-26 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/privateenv.c, libmisc/cpuuse/cpuusagereport.c,
	posix/Makefile.am, posix/include/rtems/posix/key.h,
	posix/src/keycreate.c, posix/src/keydelete.c,
	score/src/iterateoverthreads.c: Since removing ITRON, the loop over
	all APIs for tasks has a path that cannot be reached. Either modify
	the code or mark tests for NULL as RTEMS_DEBUG.
	* posix/src/keyfreememory.c: New file.
2010-07-26 22:03:18 +00:00
Joel Sherrill
1e2216c63d 2010-06-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/include/rtems/posix/pthread.h: Improve comments.
2010-06-15 15:52:29 +00:00
Ralf Corsepius
dbcc8ea95f 2010-06-15 Ralf Corsépius <ralf.corsepius@rtems.org>
* posix/include/rtems/posix/pthread.h: Remove stray comment.
	Work-around doxygen comment bug.
2010-06-15 13:26:31 +00:00
Ralf Corsepius
b02f920f6c 2010-06-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/rtems/mkrootfs.h,
	posix/include/rtems/posix/pthread.h,
	score/include/rtems/score/coresem.h,
	score/include/rtems/score/priority.h,
	score/include/rtems/score/threadq.h,
	score/include/rtems/score/timestamp.h: Move 'extern "C"'.
2010-06-14 06:08:50 +00:00
Ralf Corsepius
bbeb248511 2010-06-14 Ralf Corsépius <ralf.corsepius@rtems.org>
* posix/include/rtems/posix/threadsup.h: Add extern "C".
2010-06-14 06:03:57 +00:00
Ralf Corsepius
5836747566 2010-06-12 Ralf Corsépius <ralf.corsepius@rtems.org>
* posix/include/devctl.h: Move mal-placed @file.
2010-06-12 05:52:39 +00:00
Ralf Corsepius
e8572cfdeb 2010-04-03 Ralf Corsépius <ralf.corsepius@rtems.org>
* posix/include/sched.h: Remove.
	* posix/Makefile.am: Remove include/sched.h.
2010-04-03 05:58:06 +00:00
Ralf Corsepius
654e1f32af Reflect having split out posix/include/rtems/posix/sigset.h. 2009-12-04 15:30:08 +00:00
Ralf Corsepius
a6b8754885 2009-12-04 Ralf Corsépius <ralf.corsepius@rtems.org>
* posix/include/rtems/posix/sigset.h: New (Split out from
	posix/include/rtems/posix/psignal.h).
2009-12-04 15:24:21 +00:00
Ralf Corsepius
1de949a8bd Whitespace removal. 2009-11-30 15:49:52 +00:00
Joel Sherrill
171bbec508 2009-10-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/include/rtems/posix/threadsup.h, posix/src/cancel.c,
	posix/src/canceleval.c: Make psxcancel run again.
	_POSIX_Thread_Exit() can be called on running thread or another
	thread when it is cancelled.
2009-10-10 16:03:38 +00:00
Joel Sherrill
ff3c06a529 2009-10-04 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/include/rtems/posix/psignal.h: Add extern for ualarm timer.
	* posix/src/alarm.c, posix/src/ualarm.c: Change from switch to if since
	many enumerated values have no action.
	* posix/src/psignal.c: Initialize ualarm and alarm timers.
2009-10-04 22:08:43 +00:00
Joel Sherrill
bce23bdc98 2009-09-25 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/include/rtems/posix/threadsup.h: Add no return atrribute to
	_POSIX_Thread_Exit().
2009-09-25 12:09:27 +00:00
Joel Sherrill
b2bf0e4814 2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/include/rtems/posix/psignal.h, posix/src/mqueuecreatesupp.c,
	posix/src/psignalclearprocesssignals.c,
	posix/src/psignalclearsignals.c: Minor rework to ease coverage
	analysis.
2009-08-05 15:39:59 +00:00
Joel Sherrill
ade173922b 2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/include/rtems/posix/config.h, posix/src/mqueue.c,
	sapi/include/confdefs.h: Add configuration of posix message queue
	file descriptors as separate entity.
2009-08-05 15:29:19 +00:00
Joel Sherrill
51cec29e9e 2009-07-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/include/semaphore.h, posix/include/rtems/posix/semaphore.h:
	Move SEM_FAILED from private file to public file since it is defined
	by POSIX.
2009-07-22 15:39:09 +00:00
Joel Sherrill
12a191ae15 2009-07-21 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/include/rtems/posix/key.h, posix/src/keycreate.c,
	posix/src/keydelete.c, posix/src/keyrundestructors.c: Restructure a
	bit to make it easier to do coverage analysis. Eliminate is_active
	member of control structure because it was redundant with very the
	key object was open or closed.
2009-07-22 00:09:31 +00:00
Joel Sherrill
75eaf66aa1 2009-07-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/include/rtems/posix/cancel.h, posix/src/cancel.c,
	posix/src/canceleval.c, posix/src/setcancelstate.c,
	posix/src/setcanceltype.c: Fix a minor bug in the previous
	modification which resulted in psxcancel failing.
2009-07-21 14:16:00 +00:00
Joel Sherrill
68799a2a8f 2009-07-21 Santosh G Vattam <vattam.santosh@gmail.com>
* posix/Makefile.am, posix/include/rtems/posix/cancel.h,
	posix/src/cancel.c, posix/src/setcancelstate.c,
	posix/src/setcanceltype.c: Add
	_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch method to
	avoid duplication of code and ease coverage analysis.
	* posix/src/canceleval.c: New file.
2009-07-21 13:17:59 +00:00
Joel Sherrill
2212a2adf9 2009-06-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/Makefile.am, posix/include/rtems/posix/priority.h,
	posix/include/rtems/posix/pthread.h,
	posix/inline/rtems/posix/priority.inl, posix/src/killinfo.c,
	posix/src/pthread.c, posix/src/pthreadcreate.c,
	posix/src/pthreadsetschedparam.c: Various modifications to improve
	binary code coverage analysis. Some of these are to mark code as
	debug only. Some are to break conditional expressions into multiple
	lines. Some are to move inline methods that are not time critical
	into subroutines to make them easier to test. Inlining them multiple
	times means that their logic paths are spread across multiple
	methods. This explodes the test cases required.
	* posix/src/psxpriorityisvalid.c, posix/src/psxtransschedparam.c: New files.
2009-06-24 06:38:52 +00:00
Joel Sherrill
604f35e2dd 2009-05-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/include/rtems/posix/psignal.h,
	rtems/inline/rtems/rtems/support.inl: Remove warnings.
2009-05-08 18:07:26 +00:00
Ralf Corsepius
2a6b824b46 Make sched_getparam() POSIX compliant. 2009-02-06 21:02:31 +00:00
Joel Sherrill
3507c6df70 2009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/gxx_wrappers.c, posix/include/mqueue.h,
	posix/include/rtems/posix/semaphore.h,
	posix/inline/rtems/posix/barrier.inl,
	posix/inline/rtems/posix/key.inl,
	posix/inline/rtems/posix/mqueue.inl,
	posix/inline/rtems/posix/rwlock.inl,
	posix/inline/rtems/posix/semaphore.inl,
	posix/inline/rtems/posix/spinlock.inl,
	posix/inline/rtems/posix/timer.inl, posix/src/condget.c,
	posix/src/mqueuenametoid.c, posix/src/mutexget.c,
	posix/src/semaphorenametoid.c, posix/src/semopen.c,
	sapi/src/itronapi.c, sapi/src/posixapi.c: Make changes necessary for
	all tests to run on SPARC with 16-bit Ids. This required ensuring
	that all POSIX and compilering binding code makes a distinction
	between the public Id type (e.g. pthread_t, etc.) and the RTEMS
	Object_Id type. All POSIX Object Get routines should not take the
	POSIX Id type as the argument. Sixteen bit RTEMS Ids should be placed
	into the 32-bits reserved by the POSIX API type in a uniform manner
	now. This removed all assumptions that the external Id types in POSIX
	and ITRON are the same as the internal Object Id type.
2009-01-05 20:26:01 +00:00
Joel Sherrill
8b3416f97e 2009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/include/rtems/posix/key.h: Remove redundant prototypes for
	inlines.
2009-01-05 20:19:51 +00:00
Ralf Corsepius
111ecfd188 Make aio_suspend() POSIX-compliant. 2009-01-02 09:50:52 +00:00
Joel Sherrill
7252caf20a 2008-12-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/include/rtems/posix/config.h: Fix typo.
2008-12-17 22:12:01 +00:00
Joel Sherrill
309e2f6f8b 2008-12-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/include/rtems/posix/barrier.h,
	posix/include/rtems/posix/cond.h, posix/include/rtems/posix/key.h,
	posix/include/rtems/posix/mqueue.h,
	posix/include/rtems/posix/mutex.h,
	posix/include/rtems/posix/psignal.h,
	posix/include/rtems/posix/pthread.h,
	posix/include/rtems/posix/ptimer.h,
	posix/include/rtems/posix/rwlock.h,
	posix/include/rtems/posix/semaphore.h,
	posix/include/rtems/posix/spinlock.h,
	posix/include/rtems/posix/timer.h, posix/src/cond.c, posix/src/key.c,
	posix/src/mqueue.c, posix/src/mutex.c, posix/src/pbarrier.c,
	posix/src/prwlock.c, posix/src/psignal.c, posix/src/pspin.c,
	posix/src/pthread.c, posix/src/pthreadinitthreads.c,
	posix/src/ptimer.c, posix/src/semaphore.c, sapi/src/posixapi.c:
	Convert POSIX manager initialization routines to directly pull
	parameters from configuration table.
2008-12-17 21:23:37 +00:00
Joel Sherrill
aac75d3b9b 2008-12-15 Joel Sherrill <joel.sherrill@oarcorp.com>
* itron/include/rtems/itron/itronapi.h, libmisc/capture/capture.c,
	libmisc/monitor/mon-config.c, libmisc/monitor/mon-driver.c,
	libmisc/monitor/mon-itask.c, libmisc/monitor/mon-mpci.c,
	posix/include/rtems/posix/config.h,
	posix/include/rtems/posix/posixapi.h,
	rtems/include/rtems/rtems/config.h,
	rtems/include/rtems/rtems/rtemsapi.h, rtems/src/taskinitusers.c,
	sapi/include/confdefs.h, sapi/include/rtems/config.h,
	sapi/include/rtems/init.h, sapi/src/exinit.c, sapi/src/itronapi.c,
	sapi/src/posixapi.c, sapi/src/rtemsapi.c, score/src/isr.c,
	score/src/thread.c, score/src/threadcreateidle.c,
	score/src/threadstackallocate.c, score/src/threadstackfree.c,
	score/src/wkspace.c: Eliminate pointers to API configuration tables
	in the main configuration table. Reference the main configuration
	table and the API configuration tables directly using the confdefs.h
	version rather than obtaining a pointer to it. This eliminated some
	variables, a potential fatal error, some unnecessary default
	configuration structures. Overall, about a 4.5% reduction in the code
	size for minimum and hello on the SPARC.
2008-12-15 19:21:01 +00:00
Joel Sherrill
a6608123c0 2008-12-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* itron/src/chg_pri.c, itron/src/cre_tsk.c, itron/src/rot_rdq.c,
	posix/Makefile.am, posix/include/rtems/posix/mutex.h,
	posix/include/rtems/posix/priority.h, posix/src/mutex.c,
	score/include/rtems/score/priority.h: Run all tests successfully with
	maxixum number of priorities as 16 instead of 256. This was done by
	temporarily modifying the score priority.h maximum. This allowed
	testing of all API code to ensure that it worked properly with a
	reduced number of priorities. Most modifications were to switch from
	hard-coded maximum to using the SuperCore variable based upon
	configured number.
	* posix/src/mutexdefaultattributes.c: Removed.
2008-12-14 18:31:43 +00:00
Joel Sherrill
6a6141606b 2008-12-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/include/rtems/score/timespec.h: Remove unnecessary includes.
	Fix typo.
	* posix/include/rtems/posix/time.h, score/src/coretodget.c,
	score/src/coretodgetuptime.c: Add required include files which
	were formerly included from timespec.h
2008-12-05 22:27:47 +00:00
Joel Sherrill
8d0fdc3ca0 2008-11-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/include/rtems/posix/psignal.h: Fix typo in converting method
	from macro to static inline.
2008-11-24 16:35:36 +00:00
Joel Sherrill
d05ab3519a 2008-11-20 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/Makefile.am, posix/include/rtems/posix/psignal.h: Add stubs for
	gettimer() and setitimer().
	* posix/src/getitimer.c, posix/src/setitimer.c: New files.
2008-11-20 21:52:19 +00:00
Ralf Corsepius
f8437c81d5 Convert to "bool". 2008-09-04 15:23:12 +00:00
Joel Sherrill
f73fc29d66 2008-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* itron/include/rtems/itron/task.h, itron/src/def_cyc.c,
	itron/src/task.c, libcsupport/src/newlibc_exit.c,
	libcsupport/src/sync.c, libfs/src/imfs/imfs_fchmod.c,
	posix/include/rtems/posix/pthread.h, posix/src/pthread.c,
	posix/src/sysconf.c, rtems/include/rtems/rtems/tasks.h,
	rtems/src/tasks.c, score/include/rtems/score/stack.h,
	score/inline/rtems/score/stack.inl,
	score/inline/rtems/score/thread.inl, score/src/threadhandler.c: Fix
	various nested-externs warnings.
2008-08-18 19:18:52 +00:00
Joel Sherrill
6a0898bba3 2008-07-18 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1291/cpukit
	* itron/inline/rtems/itron/semaphore.inl, itron/src/twai_sem.c,
	posix/include/mqueue.h, posix/include/rtems/posix/mqueue.h,
	posix/include/rtems/posix/semaphore.h,
	posix/include/rtems/posix/time.h, posix/src/condtimedwait.c,
	posix/src/mqueuereceive.c, posix/src/mqueuerecvsupp.c,
	posix/src/mqueuesend.c, posix/src/mqueuesendsupp.c,
	posix/src/mqueuetimedreceive.c, posix/src/mqueuetimedsend.c,
	posix/src/mutextimedlock.c, posix/src/mutextranslatereturncode.c,
	posix/src/posixtimespecabsolutetimeout.c,
	posix/src/prwlocktimedrdlock.c, posix/src/prwlocktimedwrlock.c,
	posix/src/semaphoretranslatereturncode.c,
	posix/src/semaphorewaitsupp.c, posix/src/semtimedwait.c,
	posix/src/semtrywait.c, posix/src/semwait.c,
	posix/src/sigtimedwait.c, posix/src/timersettime.c,
	posix/src/ualarm.c, rtems/src/semobtain.c,
	rtems/src/semtranslatereturncode.c,
	score/include/rtems/score/coremutex.h,
	score/include/rtems/score/coresem.h, score/src/coresemseize.c: This
	patch addresses issues on implementation of the timeout on the
	following POSIX services. Some of these services incorrectly took a
	timeout as a relative time. Others would compute a 0 delta to timeout
	if the absolute time and the current time were equal and thus
	incorrectly block the caller forever. The root of the confusion is
	that POSIX specifies that if the timeout is incorrect (e.g. in the
	past, is now, or is numerically invalid), that it does not matter if
	the call would succeed without blocking. This is in contrast to RTEMS
	programming style where all errors are checked before any critical
	sections are entered. This fix implemented a more uniform way of
	handling POSIX absolute time timeouts.
	    + pthread_cond_timedwait - could block forever
	    + mq_timedreceive - used relative not absolute time
	    + mq_timedsend - used relative not absolute time
	    + pthread_mutex_timedlock - used relative not absolute time
	    + pthread_rwlock_timedrdlock- used relative not absolute time
	    + pthread_rwlock_timedwrlock- used relative not absolute time
	    + sem_timedwait - could block forever
2008-07-18 18:45:56 +00:00
Joel Sherrill
ecf0f4c4c1 2008-06-13 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/include/rtems/posix/pthread.h, posix/src/pthread.c,
	posix/src/pthreadcreate.c, rtems/include/rtems.h, rtems/src/attr.c,
	sapi/include/confdefs.h, sapi/include/rtems/config.h,
	score/inline/rtems/score/stack.inl, score/src/isr.c,
	score/src/mpci.c, score/src/threadcreateidle.c,
	score/src/threadinitialize.c, score/src/threadstackallocate.c: Add
	ability for application to configure minimum stack size. Add
	RTEMS_CONFIGURED_MINIMUM_STACK_SIZE constant so user can clearly
	indicate they want the configured as opposed to the recommended
	minimum stack size.
2008-06-13 15:06:32 +00:00
Thomas Doerfler
bf95ccb506 Added const qualifier to various pointers and data tables to
reduce size of data area.
	IMFS: Fixed creation of symbolic links to avoid a compiler warning.
	DOSFS: Use LibBlock instead of read() to read the boot record.
2008-05-27 10:34:15 +00:00
Joel Sherrill
345fc11da9 2008-05-22 Joel Sherrill <joel.sherrill@oarcorp.com>
* itron/include/rtems/itron/task.h, itron/src/del_tsk.c,
	itron/src/exd_tsk.c, itron/src/task.c,
	posix/include/rtems/posix/threadsup.h, posix/src/cancel.c,
	posix/src/cancelrun.c, posix/src/pthread.c, posix/src/pthreadexit.c,
	posix/src/setcancelstate.c, posix/src/setcanceltype.c,
	posix/src/testcancel.c, rtems/src/taskdelete.c,
	score/inline/rtems/score/object.inl, score/src/objectclose.c,
	score/src/threadclose.c: Make all task delete/exit/cancel routines
	follow the same critical section pattern. Also ensure that POSIX
	cancelation routines are run at thread exit.
2008-05-22 20:38:03 +00:00
Ralf Corsepius
c49b7ce289 Add c++ guards. 2008-02-15 07:42:03 +00:00
Jennifer Averett
c3925dbe92 2008-01-18 Jennifer Averett <jennifer.averett@OARcorp.com>
* posix/include/rtems/posix/timer.h, posix/src/cleanuppop.c,
	posix/src/cleanuppush.c, posix/src/mqueueclose.c,
	posix/src/timergettime.c, posix/src/timersettime.c,
	score/include/rtems/score/timespec.h:
2008-01-18 16:31:57 +00:00
Joel Sherrill
4d3200628d 2008-01-09 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/Makefile.am, posix/include/rtems/posix/cond.h,
	posix/include/rtems/posix/mutex.h, posix/inline/rtems/posix/cond.inl,
	posix/inline/rtems/posix/mutex.inl: Do not include POSIX Mutex or
	Condition Variable object get helpers because they are more
	complicated than the norm. They can implicitly perform a create. They
	cross the line as being too complex and large to inline since they
	negatively impact size and binary test coverage.
	* posix/src/condget.c, posix/src/mutexget.c: New files.
2008-01-09 22:08:31 +00:00