Commit Graph

11 Commits

Author SHA1 Message Date
Sebastian Huber dadc9e7e4a RTEMS: Add semaphore <sys/lock.h> functions
Declare semaphore try wait and post binary functions.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-11-30 07:00:45 +01:00
Sebastian Huber 5a2ab9d55e RTEMS: Timed wait by ticks <sys/lock.h> functions
Declare timed wait by ticks functions.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-11-30 07:00:45 +01:00
Sebastian Huber 186166f67a RTEMS: Add set/get name <sys/lock.h> functions
Add inline functions to set/get the name.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-11-30 07:00:45 +01:00
Sebastian Huber 69dabb3e30 RTEMS: Add user-defined name to thread queues
Add a user-defined name to the self-contained synchronization objects in
order to make system diagnostics, tracing and debugging more user
friendly.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-01-09 16:11:50 +01:00
Sebastian Huber ba49de472f Add _TICKET_LOCK_INITIALIZER to <sys/lock.h>
Add _TICKET_LOCK_INITIALIZER to statically initialize a
_Ticket_lock_Control structure.  This makes it possible to embed a
ticket lock in other structures outside of <sys/lock.h>.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-11-17 11:28:45 +01:00
Sebastian Huber 9bbc5a34f2 Use __inline in <sys/lock.h> for RTEMS
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-11-17 11:28:21 +01:00
Sebastian Huber 4b3a664a20 Add kernel space header for <sys/lock.h> for RTEMS
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-11-07 14:03:54 +01:00
Jeff Johnston de2a5d6cd3 Add _Thread_queue_Queue::_owner for RTEMS
Add _Thread_queue_Queue::_owner which will be used for the upcomming
priority inheritance implementation and an O(m) independence-preserving
protocol (OMIP) implementation.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-05-03 14:21:17 -04:00
Jeff Johnston 4f81837d78 Move _Thread_queue_Queue::_Lock for RTEMS
Move _Thread_queue_Queue::_Lock to begin of the structure.  On RTEMS,
the presence of a lock component in the thread queue structures actually
depends on the build-time RTEMS_SMP configuration option.  A move of
this part to the begin of the structure allows an implementation re-use
for the other parts.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2016-05-03 14:18:54 -04:00
Sebastian Huber b7ca25162a Fix typo in <sys/lock.h>
Sorry, there was a typo in <sys/lock.h> which leads to memory corruption
since not enough space is reserved for the lock object.

newlib/ChangeLog
2015-07-30  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* libc/sys/rtems/include/sys/lock.h (__LOCK_INIT_RECURSIVE): Use
	proper type.
2015-07-31 06:21:04 -07:00
Sebastian Huber ecaef05f66 Add <sys/lock.h>
Provide self-contained synchronization objects for RTEMS.  The API was
designed to be able to use it for the Newlib internal locks, the C11
threads support, the GCC thread model support and the libgomp operating
system configuration in combination with <pthread.h>.

References:

https://lists.rtems.org/pipermail/devel/2015-July/011989.html
https://lists.rtems.org/pipermail/devel/2015-July/012000.html

Tickets:

https://devel.rtems.org/ticket/1247
https://devel.rtems.org/ticket/2274.

v2: Fix typo in _Condition_Wait_recursive_timed() declaration.

newlib/ChangeLog
2015-07-28  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* libc/sys/rtems/include/sys/lock.h: New.
2015-07-29 11:30:05 -07:00