Commit Graph
596 Commits
Author SHA1 Message Date
Joel Sherrill a1f0ca28c0 2009-08-19 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/pthread.c: Address sporadic server edge cases. Do not
	change priority if thread is holding a priority ceiling or
	inheritance mutex. Do not change it if it looks like the thread has
	manually changed its priority. Style cleanup on file with new
	comments added.
2009-08-19 15:18:19 +00:00
Joel Sherrill 3390ba8832 2009-08-12 Joel Sherrill <joel.sherrill@OARcorp.com>
* libcsupport/Makefile.am, libcsupport/preinstall.am,
	posix/Makefile.am, posix/preinstall.am, rtems/Makefile.am,
	rtems/preinstall.am, score/Makefile.am, score/preinstall.am: Revert
	modifications accidentally committed.
2009-08-12 14:20:20 +00:00
Joel Sherrill 235aaf0c10 2009-08-09 Xi Yang <hiyangxi@gmail.com>
* libcsupport/Makefile.am, posix/Makefile.am, rtems/Makefile.am,
	sapi/Makefile.am, score/Makefile.am,
	score/include/rtems/score/heap.h: HEAP_BLOCK_USED_OVERHEAD was under
	by one uint32_t. This showed up in the unlimited and heapwalk tests
	on ARM targets.
2009-08-09 15:23:10 +00:00
Joel Sherrill d68c788e47 Revert 2009-08-06 21:45:28 +00:00
Joel Sherrill 53afba1268 2009-08-06 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/mqueuecreatesupp.c, posix/src/mqueuenametoid.c,
	posix/src/mqueueopen.c, posix/src/semaphorecreatesupp.c: Tinker with
	error handling for name too long. Use strnlen to ensure we do not run
	off the end of the maximum length string.
2009-08-06 19:26:56 +00:00
Joel Sherrill 14d9ae4190 2009-08-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/src/sigaction.c: _POSIX_signals_Clear_process_signals now takes
	signal number not mask.
2009-08-05 21:39:49 +00:00
Joel Sherrill 21de9dcbda 2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/psignalclearsignals.c: Add comments.
2009-08-05 19:09:21 +00:00
Joel Sherrill a07c8dedb0 2009-08-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/mqueuecreatesupp.c: Now that the number of POSIX message
	queues and message queue descriptors are independently configured,
	this code is reachable.
2009-08-05 16:04:36 +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 63682149f8 2009-08-02 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/psignal.c: Simplify implementation to ease coverage
	analysis.
2009-08-03 01:05:55 +00:00
Joel Sherrill 770db692bc 2009-08-01 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/src/psxtransschedparam.c, posix/src/pthread.c: Add error checks
	for 0 time on sporadic scheduler replenish period and initial budget.
	This avoids having to correct for it in the TSR, so we can eliminate
	the check for ticks == 0 there.
2009-08-01 21:49:40 +00:00
Joel Sherrill 59efe76bbf 2009-07-29 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/src/mqueuedeletesupp.c: Mark unreachable section as
	RTEMS_DEBUG.
2009-07-29 20:26:42 +00:00
Joel Sherrill 634adfeeae 2009-07-29 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/killinfo.c: Add _Thread_Enable_dispatch() on EAGAIN
	error case.  Add debug print on loop processing threads waiting
	for signal.
	* posix/src/psignal.c: When the sigwait() Thread Queue processing loop
	was changed to FIFO, I forgot to change the initialization to match.
2009-07-29 18:34:22 +00:00
Joel Sherrill 24399ad594 2009-07-24 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/killinfo.c: Rework to make easier to analyze for code
	coverage and to simplify so it is easier to analyze for correctness.
2009-07-24 19:17:54 +00:00
Joel Sherrill 099712815e 2009-07-22 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/killinfo.c: Clean up. Avoid NULL pointer case.
2009-07-22 21:26:56 +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 863a24e81e 2009-07-17 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/mutexattrgettype.c: Restructure a bit to make code coverage
	analysis easier.
2009-07-17 16:17:59 +00:00
Joel Sherrill 33a538113c 2009-07-07 Joel Sherrill <joel.sherrill@OARcorp.com>
* ChangeLog, posix/src/mutexsetprioceiling.c: Remove warning.
2009-07-07 21:04:57 +00:00
Joel Sherrill 06f5ec9ce0 2009-07-07 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/mutexsetprioceiling.c: Restructure to eliminate code
	paths which are unreachable. Also add more comments.
	* score/src/coremutexsurrender.c: Mark some code as RTEMS_DEBUG only
	since it cannot be hit unless coremutexseize.c is broken.
2009-07-07 17:29:47 +00:00
Joel Sherrill 8860ecf275 2009-07-06 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/mutexget.c: Restructure to improve ability to do coverage
	analysis.
2009-07-06 22:02:34 +00:00
Joel Sherrill 3ba0750fd1 2009-07-06 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/psxtransschedparam.c: Restructure to avoid untestable code
	being generated by switch.
2009-07-06 17:59:34 +00:00
Joel Sherrill 81551a2541 Update copyright. 2009-07-06 14:47:09 +00:00
Joel Sherrill 8cdf733f50 2009-07-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/Makefile.am, posix/src/mutex.c, posix/src/mutexinit.c: Add
	initial support for the pthread mutex type attribute added by UNIX98.
	It can be normal, recursive, errorcheck or default.
	* posix/src/mutexattrgettype.c, posix/src/mutexattrsettype.c: New files.
2009-07-06 14:46:36 +00:00
Joel Sherrill 27b961a39b 2009-07-03 Joel Sherrill <joel.sherrill@OARcorp.com>
* itron/src/task.c, posix/src/pthread.c, rtems/src/tasks.c,
	sapi/src/exinit.c, score/include/rtems/score/apiext.h,
	score/src/apiext.c: No APIs currently implemented use the
	predriver_hook so disable it until such time as it is used.
2009-07-03 20:25:35 +00:00
Joel Sherrill ecdbb4259e 2009-07-03 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/sigtimedwait.c: Restructure to improve coverage. Improve
	comments.
2009-07-03 18:40:31 +00:00
Joel Sherrill d852e2342b 2009-06-30 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/prwlocktimedrdlock.c: Restructure if slightly to make to
	make it easier to analyze for coverage.
2009-06-30 17:54:50 +00:00
Joel Sherrill 290d2b79fe 2009-06-29 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/src/killinfo.c, posix/src/mutexinit.c, posix/src/psignal.c,
	posix/src/psignalchecksignal.c, posix/src/pthread.c,
	posix/src/pthreadexit.c, posix/src/pthreadinitthreads.c: Remove
	includes of <assert.h> where possible. Make other uses conditional on
	ifdef RTEMS_DEBUG.
2009-06-29 23:19:28 +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 dba73982fd 2009-06-15 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/killinfo.c: Make easier to map coverage data.
2009-06-15 16:33:11 +00:00
Joel Sherrill 5860b90232 2009-05-15 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/getitimer.c, posix/src/setitimer.c: Add error checks and
	clean up so coverage analysis is possible.
2009-05-15 17:43:02 +00:00
Joel Sherrill f23a263f17 2009-05-15 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/sysconf.c: Restructure to improve coverage analysis.
2009-05-15 16:00:24 +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
Joel Sherrill 1e3940d547 2009-05-03 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/src/condtimedwait.c, posix/src/mutextimedlock.c,
	posix/src/prwlocktimedrdlock.c, posix/src/prwlocktimedwrlock.c,
	posix/src/semopen.c: Silence warnings.
2009-05-03 23:10:02 +00:00
Joel Sherrill a1bc675103 2009-03-12 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1393/cpukit
	* posix/src/mutextranslatereturncode.c: Add entry to table for
	CORE_MUTEX_RELEASE_NOT_ORDER.
2009-03-12 15:32:58 +00:00
Ralf Corsepius 2a6b824b46 Make sched_getparam() POSIX compliant. 2009-02-06 21:02:31 +00:00
Ralf Corsepius b1dbfd724b Eliminate TRUE/FALSE. 2009-02-03 10:10:57 +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 92f4671850 Add __attribute__((unused)) to unused function args. 2009-01-02 10:04:24 +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 3d66dfc1cb 2008-12-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/__times.c, posix/src/adjtime.c,
	posix/src/clockgetres.c, posix/src/sysconf.c,
	rtems/src/clockgettickspersecond.c, rtems/src/clockgettod.c,
	rtems/src/clockset.c, rtems/src/clocktodvalidate.c,
	score/src/timespecfromticks.c, score/src/timespectoticks.c,
	score/src/ts64toticks.c: More case converted to use configuration
	table entry not _TOD_Microseconds_per_tick.
2008-12-16 17:36:01 +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 c16bcc009b 2008-12-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/__times.c, libmisc/cpuuse/cpuusagereport.c,
	libmisc/cpuuse/cpuusagereset.c, posix/src/clockgettime.c,
	posix/src/pthread.c, posix/src/timersettime.c,
	rtems/include/rtems/rtems/ratemon.h,
	rtems/src/clockgetsecondssinceepoch.c, rtems/src/clockgetuptime.c,
	rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c,
	rtems/src/ratemonreportstatistics.c, rtems/src/taskwakewhen.c,
	rtems/src/timerfirewhen.c, rtems/src/timerserver.c,
	rtems/src/timerserverfirewhen.c, score/Makefile.am,
	score/preinstall.am, score/include/rtems/score/thread.h,
	score/include/rtems/score/tod.h, score/src/coretod.c,
	score/src/coretodget.c, score/src/coretodgetuptime.c,
	score/src/coretodset.c, score/src/coretodtickle.c,
	score/src/threaddispatch.c, score/src/threadinitialize.c: Add
	SuperCore handler Timestamp to provide an opaque class for the
	representation and manipulation of uptime, time of day, and the
	difference between two timestamps. By using SuperCore Timestamp, it
	is clear which methods and APIs really have to be struct timespec and
	which can be in an optimized native format.
	* score/include/rtems/score/timestamp.h,
	score/src/coretodgetuptimetimespec.c: New files.
2008-12-08 19:41:31 +00:00