| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the storage for the thread queue heads to the threads. Each thread
provides a set of thread queue heads allocated from a dedicated memory
pool. In case a thread blocks on a queue, then it lends its heads to
the queue. In case the thread unblocks, then it takes a free set of
threads from the queue. Since a thread can block on at most one queue
this works. This mechanism is used in FreeBSD. The motivation for this
change is to reduce the memory demands of the synchronization objects.
On a 32-bit uni-processor configuration the Thread_queue_Control size is
now 8 bytes, compared to 64 bytes in RTEMS 4.10 (other changes reduced
the size as well).
|
|
|
|
|
|
| |
Separate the thread queue heads and lock from the operations. This
enables the support for light weight objects which only support one
queuing discipline.
|
| |
|
| |
|
|
|
|
|
| |
Remove thread queue parameter from _Thread_queue_Extract() since the
current thread queue is stored in the thread control block.
|
|
|
|
|
| |
Use a parameter for _Thread_queue_Enqueue() instead to reduce memory
usage.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add _Thread_queue_Extract_with_return_code(). On SMP this sequence in
_Thread_queue_Process_timeout() was broken:
[...]
/*
* After we enable interrupts here, a lot may happen in the
* meantime, e.g. nested interrupts may release the resource that
* times out here. So we enter _Thread_queue_Extract()
* speculatively. Inside this function we check the actual status
* under ISR disable protection. This ensures that exactly one
* executing context performs the extract operation (other parties
* may call _Thread_queue_Dequeue()). If this context won, then
* we have a timeout.
*
* We can use the_thread_queue pointer here even if
* the_thread->Wait.queue is already set to NULL since the extract
* operation will only use the thread queue discipline to select
* the right extract operation. The timeout status is set during
* thread queue initialization.
*/
we_did_it = _Thread_queue_Extract( the_thread_queue, the_thread );
if ( we_did_it ) {
the_thread->Wait.return_code = the_thread_queue->timeout_status;
}
[...]
In case _Thread_queue_Extract() successfully extracted a thread, then
this thread may start execution on a remote processor immediately and
read the the_thread->Wait.return_code before we update it here with the
timeout status. Thus it observes a successful operation even if it
timed out.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
* Makefile.am, configure.ac: Add test for Thread Queue extract a thread
not blocked on a thread queue.
* spthreadq01/.cvsignore, spthreadq01/Makefile.am, spthreadq01/init.c,
spthreadq01/spthreadq01.doc, spthreadq01/spthreadq01.scn: New files.
|