Commit Graph
1159 Commits
Author SHA1 Message Date
Sebastian Huber c8982e5f6a posix: Simplify message queues
The mq_open() function returns a descriptor to a POSIX message queue
object identified by a name.  This is similar to sem_open().  In
contrast to the POSIX semaphore the POSIX message queues use a separate
object for the descriptor.  This extra object is superfluous, since the
object identifier can be used directly for this purpose, just like for
the semaphores.

Update #2702.
Update #2555.
2016-05-02 07:46:15 +02:00
Sebastian Huber 36cd27c1e3 score: Simplify _Objects_Get_next()
Remove unused location parameter.
2016-04-21 07:29:40 +02:00
Sebastian Huber 648a5df4ce malloc: Avoid memory leaks during task delete
Call _Malloc_Process_deferred_frees() owning the allocator lock to
prevent deletion of the executing thread while doing the deferred frees.
2016-04-06 13:52:25 +02:00
Sebastian Huber d7e68c96b4 malloc: Fix early realloc() allocation 2016-04-06 13:50:16 +02:00
Joel Sherrill 92b6f6e9c9 Move various driver interface definition headers file libcsupport/ to include/
These were in libcsupport for historical reasons and the placement
no longer made sense.

As part of this move, some of the files were placed under subdirectories
which reflect their installed location.

Thank you git for allowing us to move files. Years of CVS resulted
in files being somewhere they no longer belonged.
2016-03-30 09:32:33 -05:00
Sebastian Huber 5eaf0e7458 posix: Use per-thread lookup tree for POSIX Keys
Yields higher performance on SMP systems.

Close #2625.
2016-03-18 07:43:46 +01:00
Sebastian Huber d37adfe5dd score: Fix CPU time used by executing threads
The CPU time used of a thread was previously maintained per-processor
mostly during _Thread_Dispatch().  However, on SMP configurations the
actual processor of a thread is difficult to figure out since thread
dispatching is a highly asynchronous process (e.g. via inter-processor
interrupts).  Only the intended processor of a thread is known to the
scheduler easily.  Do the CPU usage accounting during thread heir
updates in the context of the scheduler operations.  Provide the
function _Thread_Get_CPU_time_used() to get the CPU usage of a thread
using proper locks to get a consistent value.

Close #2627.
2016-03-17 08:27:47 +01:00
Sebastian Huber 75518fb782 malloc: Fix function definition
Close #2617.
2016-03-01 07:34:56 +01:00
Sebastian Huber 9d1f394345 malloc: Add _Malloc_System_state()
Replace malloc_is_system_state_OK() with _Malloc_System_state() to allow
early allocations, e.g. in bsp_start().  Here the _Thread_Executing is
NULL, thus an _API_Mutex_Lock() would lead to a NULL pointer access.

Move malloc() support code to general case
rtems_heap_allocate_aligned_with_boundary().  Use
rtems_heap_allocate_aligned_with_boundary() to avoid duplicated code.
2016-02-25 11:35:54 +01:00
Sebastian Huber 839d0a74e5 malloc: Use dedicated lock for deferred frees 2016-02-25 09:10:53 +01:00
Sebastian Huber 287a70f935 malloc: Clean up "malloc_p.h" header file 2016-02-25 09:06:07 +01:00
Sebastian Huber ca4602e914 Use linker set for libio initialization
Update #2408.
2016-02-03 10:00:57 +01:00
Sebastian Huber f64c6b4c49 Use atexit() handler to close std file descriptors 2016-02-03 10:00:57 +01:00
Sebastian Huber 3d36164fe5 Use linker set for root file system initialization
Update #2408.
2016-02-03 10:00:57 +01:00
Sebastian Huber e079b33e76 Filesystem: Export most generic path eval function
Add path length parameter to
rtems_filesystem_eval_path_start_with_root_and_current() so that users
may pass paths without a '\0' termination.

Update #2558.
2016-02-02 08:06:10 +01:00
Joel Sherrill f5201df0dc Remove M32R architecture
updates #2446.
2016-01-04 11:07:00 -06:00
Aun-Ali Zaidi d5154d0f6a api: Remove deprecated Notepads
Notepads where a feature of RTEMS' tasks that simply functioned in
the same way as POSIX keys or threaded local storage (TLS). They were
introduced well before per task variables, which are also deprecated,
and were barely used in favor of their POSIX alternatives.

In addition to their scarce usage, Notepads took up unnecessary memory.
For each task:

 - 16 32-bit integers were allocated.
 - A total of 64 bytes per task per thread.

This is especially critical in low memory and safety-critical applications.

They are also defined as uint32_t, and therefore are not guaranteed to
hold a pointer.

Lastly, they are not portable solutions for SMP and uniprocessor systems,
like POSIX keys and TLS.

updates #2493.
2015-12-24 16:52:34 -06:00
Sebastian Huber 50552818d7 Delete unused declarations and define 2015-11-27 07:25:01 +01:00
Sebastian Huber 443c61ec94 Delete empty libc_init() 2015-11-27 07:24:51 +01:00
Sebastian Huber ac5f2442e3 Require __getreent()
This function is used by Newlib since 2013-07-09 (Git commit
9b51cd8c6b9cdd067d9648a7ab952884019c56a5).
2015-11-25 08:33:31 +01:00
Sebastian Huber 8f3ec7c0d9 Import latest <sys/ttycom.h> from FreeBSD
Required by new network stack.
2015-11-17 15:22:18 +01:00
Sebastian Huber f757bb7c4b Merge with latest <sys/sockio.h> from FreeBSD
Required by new network stack.
2015-11-17 15:12:34 +01:00
Sebastian Huber 836803f72a Import latest <sys/filio.h> from FreeBSD
Required by new network stack.
2015-11-17 14:57:47 +01:00
Sebastian Huber f97536dcd3 basdefs.h: Add and use RTEMS_UNUSED 2015-10-26 09:13:19 +01:00
Sebastian Huber 143696acbd basedefs.h: Add and use RTEMS_NO_RETURN 2015-10-26 09:13:19 +01:00
Sebastian Huber 2d48456ef5 rbheap: Drop direction from _RBTree_Iterate() 2015-08-31 09:59:42 +02:00
Sebastian Huber d7665823b2 score: Introduce Thread_queue_Heads
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).
2015-07-23 08:01:13 +02:00
Sebastian Huber c5d0ca91cf libcsupport: Workaround for GCC 5.1 and later
Disable an optimization which would lead to a recursive calloc() call in
calloc().
2015-07-15 08:46:36 +02:00
Sebastian Huber 48fed9a56e score: Simplify <rtems/system.h>
Drop the <rtems/score/percpu.h> include since this file exposes a lot of
implementation details.
2015-06-26 09:16:25 +02:00
Joel Sherrill e6b31b27fb Remove use ticks for statistics configure option.
This was obsolete and broken based upon recent time keeping changes.

Thie build option was previously enabled by adding
USE_TICKS_FOR_STATISTICS=1 to the configure command line.

This propagated into the code as preprocessor conditionals
using the __RTEMS_USE_TICKS_FOR_STATISTICS__ conditional.
2015-06-15 13:20:17 -05:00
Joel Sherrill 221031ec9f kill_noposix.c: Remove obsolete __kill() 2015-05-21 08:28:54 -07:00
Sebastian Huber 776a50c47a Filesystem: Thread life protection for env changes 2015-05-19 12:00:44 +02:00
Sebastian Huber 4a3c920d30 libcsupport: Fix umask() locking
Delete comment related to an obsolete implementation of
rtems_libio_set_private_env().
2015-05-19 12:00:44 +02:00
Sebastian Huber 2b0bbc4a65 libcsupport: Avoid Giant lock in rtems_verror() 2015-05-19 12:00:44 +02:00
Sebastian Huber c07c85f4f2 Filesystem: Use lock for deferred release 2015-05-19 12:00:44 +02:00
Sebastian Huber 5f7f469a96 libcsupport: Avoid Giant lock in _times() 2015-05-19 12:00:43 +02:00
Sebastian Huber 1a6683aa57 libcsupport: Include missing header file 2015-03-26 21:37:33 +01:00
Sebastian Huber 1f671565ab libcsupport: Delete superfluous _gettimeofday() 2015-03-10 08:56:06 +01:00
Joel Sherrill 1aa7b8beb1 Move contents of libcsupport/include/zilog into libbsp/shared
Only a few BSPs use this and it should not have been in libcsupport.
2015-03-09 16:15:14 -05:00
Joel Sherrill 6796d9cd69 Remove unused cpukit/libcsupport/include/zilog/z8536.h 2015-03-09 16:15:14 -05:00
Joel Sherrill 5bc6237a36 Move libcsupport/include/motorola/*.h to m68k/idp BSP
These header files were only used by one BSP and they are
hardware dependent. The hardware dependency always made
them bad candidates for where they were in the tree. But
this fixes that.
2015-03-09 16:15:14 -05:00
Joel Sherrill 2468aa3dff vprintk.c: Reorder switch and add default to eliminate warning 2015-03-09 16:14:17 -05:00
Joel Sherrill a7e4de2504 Fix even more Doxygen issues 2015-03-06 14:33:08 -06:00
Sebastian Huber 5b5d2fd4f2 Filesystem: Delete unused null_op_fsmount_me() 2015-03-05 09:37:36 +01:00
Gedare Bloom 76f37656a2 libcsupport: scale times() call to microseconds 2015-03-04 15:38:52 -05:00
Nick Withers 5eb27ce409 Don't fail to create passwd and group files if /etc already exists 2015-02-20 08:56:25 +01:00
Sebastian Huber 353506b93e sys/event.h: Update to FreeBSD 9.3 2015-02-13 10:48:35 +01:00
Sebastian Huber eb7753437f Filesystem: Delete unused fsmountme_h handler 2015-02-09 15:38:48 +01:00
Sebastian Huber 4c14ace6dd Add rtems_filesystem_make_dev_t_from_pointer() 2015-02-04 19:31:52 +01:00
Sebastian Huber efd2965abf Filesystem: Statically initialize rtems_libio_iops 2015-02-04 14:03:49 +01:00