| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Updates #3053.
|
|
|
|
|
| |
Move common code into _Thread_Exit(). This enables a tail call
optimization in most cases.
|
|
|
|
|
|
|
|
|
|
| |
The __builtin_unreachable() cannot be used with current GCC versions to
tell the compiler that a function does not return to the caller, see:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99151
Add a no return variant of _Thread_Dispatch_direct() to avoid generation
of dead code.
|
|
|
|
| |
This order change fixes the Latex documentation build via Doxygen.
|
|
|
|
|
|
|
|
| |
Use the following variant which was already used by most source files:
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
|
|
|
|
|
|
|
| |
Use _Thread_Dispatch_direct() for operations that block the executing
thread. This ensures that we get a fatal error
(INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL) if we try to block in
an invalid context, e.g. during system start or an interrupt handler.
|
|
|
|
|
|
|
|
| |
Add Thread_Life_state::THREAD_LIFE_CHANGE_DEFERRED and rework the POSIX
thread cancellation to use the thread life states.
Update #2555.
Update #2626.
|
|
|
|
|
|
|
|
|
| |
Rework pthread_join() to use _Thread_Join().
Close #2402.
Update #2555.
Update #2626.
Close #2714.
|
|
|
|
|
|
|
|
| |
Disable thread dispatching is enough to prevent deletion of the
executing thread. There is no need for an additional life protection.
Update #2555.
Update #2626.
|
|
|
|
|
|
|
|
| |
The goal is to make _Thread_Exit() a no-return function in follow up
patches.
Update #2555.
Update #2626.
|
|
|
|
|
|
|
|
|
| |
Remove the Thread_queue_Queue::operations field to reduce the size of
this structure. Add a thread queue operations parameter to the
_Thread_queue_First(), _Thread_queue_First_locked(),
_Thread_queue_Enqueue(), _Thread_queue_Dequeue() and
_Thread_queue_Flush() functions. This is a preparation patch to reduce
the size of several synchronization objects.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function to change a thread priority was too complex. Simplify it
with a new scheduler operation. This increases the average case
performance due to the simplified logic. The interrupt disabled
critical section is a bit prolonged since now the extract, update and
enqueue steps are executed atomically. This should however not impact
the worst-case interrupt latency since at least for the Deterministic
Priority Scheduler this sequence can be carried out with a wee bit of
instructions and no loops.
Add _Scheduler_Change_priority() to replace the sequence of
- _Thread_Set_transient(),
- _Scheduler_Extract(),
- _Scheduler_Enqueue(), and
- _Scheduler_Enqueue_first().
Delete STATES_TRANSIENT, _States_Is_transient() and
_Thread_Set_transient() since this state is now superfluous.
With this change it is possible to get rid of the
SCHEDULER_SMP_NODE_IN_THE_AIR state. This considerably simplifies the
implementation of the new SMP locking protocols.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The thread deletion is now supported on SMP.
This change fixes the following PRs:
PR1814: SMP race condition between stack free and dispatch
PR2035: psxcancel reveals NULL pointer access in _Thread_queue_Extract()
The POSIX cleanup handler are now called in the right context (should be
called in the context of the terminating thread).
http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html
Add a user extension the reflects a thread termination event. This is
used to reclaim the Newlib reentrancy structure (may use file
operations), the POSIX cleanup handlers and the POSIX key destructors.
|
| |
|
|
|
|
|
|
|
|
| |
Move implementation specific parts of tqdata.h, threadq.h and
threadq.inl into new header file threadqimpl.h. The threadq.h contains
now only the application visible API.
Delete tqdata.h.
|
|
|
|
|
|
|
|
| |
Move implementation specific parts of thread.h and thread.inl into new
header file threadimpl.h. The thread.h contains now only the
application visible API.
Remove superfluous header file includes from various files.
|
|
|
|
|
|
| |
Move implementation specific parts of pthread.h and pthread.inl into new
header file pthreadimpl.h. The pthread.h contains now only the
application visible API.
|
| |
|
|
|
|
|
|
| |
Add and use _Objects_Put_without_thread_dispatch(). These two functions
pair with the _Objects_Get() function. This helps to introduce object
specific SMP locks to avoid lock contention.
|
|
|
|
| |
http://www.google-melange.com/gci/task/view/google/gci2012/7955219
|
|
|
|
|
|
|
|
|
|
|
|
| |
Script does what is expected and tries to do it as
smartly as possible.
+ remove occurrences of two blank comment lines
next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
contain CVS Ids
+ If the processing left a blank line at the top of
a file, it was removed.
|
|
|
|
|
|
|
|
| |
PR 1867/cpukit
* posix/src/pthreadexit.c, posix/src/pthreadjoin.c: Correct
implementation of pthread_exit() and pthread_join() to support the
case where a thread is joinable but calls pthread_exit() before a
thread has attempted to join.
|
| |
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* itron/src/exd_tsk.c, itron/src/task.c, libmisc/capture/capture.c,
libmisc/monitor/mon-config.c, libmisc/monitor/mon-driver.c,
libmisc/monitor/mon-itask.c, libmisc/monitor/mon-monitor.c,
libmisc/monitor/mon-mpci.c, libmisc/monitor/mon-object.c,
libmisc/monitor/mon-symbols.c, posix/src/cancelrun.c,
posix/src/pthreadexit.c, rtems/Makefile.am, rtems/preinstall.am,
rtems/include/rtems.h, rtems/include/rtems/rtems/support.h,
rtems/inline/rtems/rtems/tasks.inl, rtems/src/eventmp.c,
rtems/src/msgmp.c, rtems/src/partmp.c, rtems/src/regionmp.c,
rtems/src/rtemsobjectgetname.c, rtems/src/semmp.c,
rtems/src/signalmp.c, rtems/src/taskdelete.c, rtems/src/taskmp.c,
rtems/src/timerserver.c, score/Makefile.am,
score/include/rtems/score/object.h,
score/inline/rtems/score/object.inl, score/src/Unlimited.txt,
score/src/objectgetnameasstring.c,
score/src/threadqextractwithproxy.c: Add new Object Services
collection. This changed the name of a few previously public but
undocumented services and added a some new services.
* rtems/include/rtems/rtems/object.h, rtems/src/rtemsbuildid.c,
rtems/src/rtemsbuildname.c, rtems/src/rtemsobjectapimaximumclass.c,
rtems/src/rtemsobjectapiminimumclass.c,
rtems/src/rtemsobjectgetapiclassname.c,
rtems/src/rtemsobjectgetapiname.c,
rtems/src/rtemsobjectgetclassicname.c,
rtems/src/rtemsobjectgetclassinfo.c,
rtems/src/rtemsobjectidapimaximum.c,
rtems/src/rtemsobjectidapiminimum.c, rtems/src/rtemsobjectidgetapi.c,
rtems/src/rtemsobjectidgetclass.c, rtems/src/rtemsobjectidgetindex.c,
rtems/src/rtemsobjectidgetnode.c, rtems/src/rtemsobjectsetname.c,
score/src/objectapimaximumclass.c, score/src/objectgetinfo.c,
score/src/objectgetinfoid.c, score/src/objectsetname.c: New files.
* rtems/src/rtemsidtoname.c: Removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* itron/include/rtems/itron/object.h, itron/src/cre_tsk.c,
libblock/src/show_bdbuf.c, libmisc/capture/capture-cli.c,
libmisc/capture/capture.c, libmisc/monitor/mon-manager.c,
libmisc/stackchk/check.c, posix/src/condinit.c,
posix/src/keycreate.c, posix/src/mqueuecreatesupp.c,
posix/src/mqueuedeletesupp.c, posix/src/mqueuenametoid.c,
posix/src/mqueueopen.c, posix/src/mqueueunlink.c,
posix/src/mutexinit.c, posix/src/pbarrierinit.c,
posix/src/prwlockinit.c, posix/src/pspininit.c,
posix/src/pthreadcreate.c, posix/src/pthreadexit.c,
posix/src/semaphorecreatesupp.c, posix/src/semaphorenametoid.c,
posix/src/timercreate.c, rtems/src/barrierident.c,
rtems/src/dpmemident.c, rtems/src/msgqident.c, rtems/src/partident.c,
rtems/src/ratemonident.c, rtems/src/regionident.c,
rtems/src/semident.c, rtems/src/taskident.c, rtems/src/timerident.c,
sapi/src/extensionident.c, score/Makefile.am,
score/include/rtems/score/object.h,
score/inline/rtems/score/object.inl, score/src/apimutexallocate.c,
score/src/objectextendinformation.c,
score/src/objectgetnameasstring.c, score/src/objectmp.c,
score/src/objectnametoid.c: Convert the Objects_Name type from a
simple type to a union of an unsigned 32 bit integer and a pointer.
This should help eliminate weird casts between u32 and pointers in
various places. The APIs now have to explicitly call _u32 or _string
versions of helper routines. This should also simplify things and
eliminate the need for ugly casts in some cases.
* score/src/objectclearname.c, score/src/objectcomparenameraw.c,
score/src/objectcomparenamestring.c, score/src/objectcopynameraw.c,
score/src/objectcopynamestring.c: Removed.
|
| |
|
|
|
|
|
|
| |
* src/cancelrun.c, src/pthreadexit.c, src/pthreadjoin.c,
src/sigtimedwait.c: Remove unnecessary typecasts in assignments to
thread->Wait.return_argument.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* include/rtems/posix/cond.h, include/rtems/posix/condmp.h,
include/rtems/posix/config.h, include/rtems/posix/intr.h,
include/rtems/posix/key.h, include/rtems/posix/mqueue.h,
include/rtems/posix/mqueuemp.h, include/rtems/posix/mutex.h,
include/rtems/posix/mutexmp.h, include/rtems/posix/posixapi.h,
include/rtems/posix/pthread.h, include/rtems/posix/pthreadmp.h,
include/rtems/posix/ptimer.h, include/rtems/posix/semaphore.h,
include/rtems/posix/semaphoremp.h, inline/rtems/posix/cond.inl,
inline/rtems/posix/intr.inl, inline/rtems/posix/key.inl,
inline/rtems/posix/mqueue.inl, inline/rtems/posix/mutex.inl,
inline/rtems/posix/pthread.inl, inline/rtems/posix/semaphore.inl,
inline/rtems/posix/timer.inl, macros/rtems/posix/cond.inl,
macros/rtems/posix/intr.inl, macros/rtems/posix/key.inl,
macros/rtems/posix/mqueue.inl, macros/rtems/posix/mutex.inl,
macros/rtems/posix/pthread.inl, macros/rtems/posix/semaphore.inl,
macros/rtems/posix/timer.inl, src/alarm.c, src/kill.c,
src/killinfo.c, src/mqueuetranslatereturncode.c, src/pause.c,
src/pthreadattrdestroy.c, src/pthreadattrgetdetachstate.c,
src/pthreadattrgetinheritsched.c, src/pthreadattrgetschedparam.c,
src/pthreadattrgetschedpolicy.c, src/pthreadattrgetscope.c,
src/pthreadattrgetstackaddr.c, src/pthreadattrgetstacksize.c,
src/pthreadattrinit.c, src/pthreadattrsetdetachstate.c,
src/pthreadattrsetinheritsched.c, src/pthreadattrsetschedparam.c,
src/pthreadattrsetschedpolicy.c, src/pthreadattrsetscope.c,
src/pthreadattrsetstackaddr.c, src/pthreadattrsetstacksize.c,
src/pthreadcreate.c, src/pthreaddetach.c, src/pthreadequal.c,
src/pthreadexit.c, src/pthreadgetcpuclockid.c,
src/pthreadgetcputime.c, src/pthreadgetschedparam.c,
src/pthreadjoin.c, src/pthreadkill.c, src/pthreadonce.c,
src/pthreadself.c, src/pthreadsetcputime.c,
src/pthreadsetschedparam.c, src/pthreadsigmask.c, src/sigaction.c,
src/sigaddset.c, src/sigdelset.c, src/sigemptyset.c,
src/sigfillset.c, src/sigismember.c, src/signal_2.c,
src/sigpending.c, src/sigprocmask.c, src/sigqueue.c,
src/sigsuspend.c, src/sigtimedwait.c, src/sigwait.c,
src/sigwaitinfo.c, src/ualarm.c: URL for license changed.
|
|
|
|
|
|
|
| |
* configure.in: Add src/config.h
* src/Makefile.am: Add INCLUDES += -I. to pickup config.h
* src/.cvsignore: Add config.h and stamp-h
* src/*.c: Add config.h support.
|
| |
|
|
|
|
| |
should NEVER occur.
|
|
|