Commit Graph

885 Commits

Author SHA1 Message Date
Sebastian Huber
dd40e1438b sptests/spfatal08: Simplify 2012-11-07 15:08:43 +01:00
Sebastian Huber
3dd120f003 sptests/spfatal07: Use confdefs.h to trigger test 2012-11-07 15:08:42 +01:00
Sebastian Huber
0edf263139 rtems: Add system events
System events are similar to normal events.  They offer a second set of
events.  These events are intended for internal RTEMS use and should not
be used by applications (with the exception of the transient system
event).
2012-10-30 18:03:02 +01:00
Sebastian Huber
47a3cd8f73 score: Work area initialization API change
The work areas (RTEMS work space and C program heap) will be initialized
now in a separate step and are no longer part of
rtems_initialize_data_structures().  Initialization is performed with
tables of Heap_Area entries.  This allows usage of scattered memory
areas present on various small scale micro-controllers.

The sbrk() support API changes also.  The bsp_sbrk_init() must now deal
with a minimum size for the first memory chunk to take the configured
work space size into account.
2012-10-25 14:54:06 +02:00
Sebastian Huber
178a7bb95b sptests/sp39: Increase clock tick interval
Not every BSP supports a 250 micro seconds clock tick interval.  For
example PSIM.
2012-10-15 14:58:08 +02:00
Joel Sherrill
0e27119f80 Use proper 3 line form of license text 2012-10-11 15:52:51 -05:00
Ralf Corsépius
fd7161017b Cleanup Krzysztof's copyright notices. 2012-10-11 18:25:03 +02:00
Sebastian Huber
9b83a66546 score: Critical fix for thread dispatching
The changes in _Thread_Dispatch() of commits
dad36c52b8 and
d4dc7c8196 introduced a severe bug which
destroys the real-time properties of RTEMS completely.

Consider the following scenario.  We have three tasks L (lowest
priority), M (middle priority), and H (highest priority).  Now let a
thread dispatch from M to L happen.  An interrupt occurs in
_Thread_Dispatch() here:

void _Thread_Dispatch( void )
{
  [...]

post_switch:

  _ISR_Enable( level );

  <-- INTERRUPT
  <-- AFTER INTERRUPT

  _Thread_Unnest_dispatch();

  _API_extensions_Run_postswitch();
}

The interrupt event makes task H ready.  The interrupt code will see
_Thread_Dispatch_disable_level > 0 and thus doesn't perform a
_Thread_Dispatch().  Now we return to position "AFTER INTERRUPT".  This
means task L executes now although task H is ready!  Task H will execute
once someone calls _Thread_Dispatch().
2012-10-07 14:40:49 +02:00
Krzysztof Mięsowicz
a6eaa5489c timespec helpers: Add wrappers with new test 2012-08-29 07:38:54 -05:00
Krzysztof Mięsowicz
3913e3cf93 sp77: new test to cover allocated message size overflowing
Author:    Krzysztof Mięsowicz <krzysztof.miesowicz@gmail.com>
2012-08-29 07:37:01 -05:00
Gedare Bloom
57e922c799 Revert "Add config.h.in."
This reverts commit cf42a6ea9d.
2012-08-06 13:04:24 -04:00
Ralf Corsépius
bb2b8259ea Require automake-1.12.2. 2012-07-19 15:47:55 +02:00
Ralf Corsépius
0f772813aa Require autoconf-2.69. 2012-07-19 15:44:32 +02:00
Sebastian Huber
317ee8d7ff score: Change greedy allocation API 2012-07-17 10:19:16 +02:00
Sebastian Huber
3246b0f8fc score: New structure TOD_Control
Group the global TOD variables (_TOD_Now, _TOD_Uptime, and _TOD_Is_set)
in a structure to reduce address loads in _TOD_Tickle_ticks().
2012-06-14 14:20:30 +02:00
Joel Sherrill
3c8eda77b9 sptests - Eliminate missing prototype warnings 2012-05-31 10:06:16 -05:00
Ralf Corsépius
cf42a6ea9d Add config.h.in. 2012-05-24 07:17:05 +02:00
Joel Sherrill
9b4422a251 Remove All CVS Id Strings Possible Using a Script
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.
2012-05-11 08:44:13 -05:00
Joel Sherrill
c100ba13de spqreslib - Make global data extern in system.h
Global data was declared in system.h but should have been extern
in system.h and declared in init.c. There were duplicate symbol
linking errors on at least powerpc/mpc8260ads.
2012-05-09 16:55:05 -05:00
Gedare Bloom
f53aa8d302 rbtree: API changes. Remove rbtree control node from RBTree_Next.
The implementation of RBTree_Next was using an awkward construction to detect
and avoid accessing the false root of the red-black tree. To deal with the
false root, RBTree_Next was comparing node parents with the control node.
Instead the false root can be detected by checking if the grandparent of a
node exists; the grandparent of the tree's true root is NULL by definition
so the root of the tree is found while walking up the tree by checking for
the non-existence of a grandparent.

This change propagates into the predecessor/successor and iterate functions.
2012-05-08 18:40:44 -04:00
Joel Sherrill
33a105fb69 Revert: Remove CVS Ids
See http://www.rtems.org/pipermail/rtems-devel/2012-May/001006.html
for details.
2012-05-07 11:08:48 -05:00
Sebastian Huber
5a4bb758c0 Filesystem: Remove per file descriptor semaphore
The per file descriptor semaphore (field of rtems_libio_t) is unused in
RTEMS.  There is a considerable memory overhead due to that.  A
semaphore needs roughly 124 bytes which is huge compared to the
approximately 72 bytes for the file descriptor structure itself.  Device
drivers can create their own synchronization primitives in the open
handler on demand.
2012-05-04 10:53:51 +02:00
Ralf Corsépius
70f3719807 Remove CVS-Ids. 2012-05-04 09:36:24 +02:00
Joel Sherrill
604405d886 sp07/buffered_io.c add missing copyright
Date and ownership determined from file history.
2012-05-03 09:41:38 -05:00
Gedare Bloom
fb78f9170f PR1908: consolidate libqos code and fix installed header location 2012-04-23 09:26:34 -04:00
Petr Benes
1c2b94a61c PR1908: QoS library for CBS scheduler
Add the lipqos and sptest.
2012-04-15 23:12:08 -04:00
Petr Benes
c050143273 PR1908: QoS library for CBS scheduler
Since the CBS scheduler is inspired by AQuoSA project for Linux, additional API
(qreslib) compliant with Linux has been created.

Sptest for qreslib included.
2012-04-15 23:06:34 -04:00
Sebastian Huber
8c6608bd1b rbtree: PR2046: Replace rtems_rbtree_unique 2012-04-13 09:14:18 +02:00
Sebastian Huber
dc62a48cc5 rbtree: PR1995: API change
New functions
  o _RBTree_Next_unprotected(),
  o _RBTree_Next(),
  o _RBTree_Successor_unprotected(),
  o _RBTree_Predecessor_unprotected(),
  o rtems_rbtree_successor_unprotected(), and
  o rtems_rbtree_predecessor_unprotected().

Change prototype of
  o _RBTree_Successor(),
  o _RBTree_Predecessor(),
  o rtems_rbtree_successor(), and
  o rtems_rbtree_predecessor().
2012-04-11 11:24:18 +02:00
Gedare Bloom
890358f4f7 PR1994: RBTree Compare Result Change
Change the meaning of the compare result to simplify comparison of
integer keys.
2012-03-29 20:42:36 -04:00
Sebastian Huber
e00cca9b74 IMFS: Do not check for unsupported types
Allow creation of nodes with an unsupported type.  Later the usage of
such nodes will return an error status.
2012-03-13 12:24:15 +01:00
Sebastian Huber
3b7c123c8d Filesystem: Reference counting for locations
o A new data structure rtems_filesystem_global_location_t was
   introduced to be used for
    o the mount point location in the mount table entry,
    o the file system root location in the mount table entry,
    o the root directory location in the user environment, and
    o the current directory location in the user environment.
   During the path evaluation global start locations are obtained to
   ensure that the current file system instance will be not unmounted in
   the meantime.
 o The user environment uses now reference counting and is protected
   from concurrent access.
 o The path evaluation process was completely rewritten and simplified.
   The IMFS, RFS, NFS, and DOSFS use now a generic path evaluation
   method.  Recursive calls in the path evaluation have been replaced
   with iteration to avoid stack overflows.  Only the evaluation of
   symbolic links is recursive.  No dynamic memory allocations and
   intermediate buffers are used in the high level path evaluation.  No
   global locks are held during the file system instance specific path
   evaluation process.
 o Recursive symbolic link evaluation is now limited by
   RTEMS_FILESYSTEM_SYMLOOP_MAX.  Applications can retrieve this value
   via sysconf().
 o The device file system (devFS) uses now no global variables and
   allocation from the workspace.  Node names are allocated from the
   heap.
 o The upper layer lseek() performs now some parameter checks.
 o The upper layer ftruncate() performs now some parameter checks.
 o unmask() is now restricted to the RWX flags and protected from
   concurrent access.
 o The fchmod_h and rmnod_h file system node handlers are now a file
   system operation.
 o The unlink_h operation has been removed.  All nodes are now destroyed
   with the rmnod_h operation.
 o New lock_h, unlock_h, clonenod_h, and are_nodes_equal_h file system
   operations.
 o The path evaluation and file system operations are now protected by
   per file system instance lock and unlock operations.
 o Fix and test file descriptor duplicate in fcntl().
 o New test fstests/fsnofs01.
2012-03-13 12:23:37 +01:00
Gedare Bloom
a52be5ec40 PR2034: sprbtree01: predecessor/successor imprecision
The tests for the rtems_rbtree_predecessor/successor check for a
range of values for the target id of the predecessor/successor
when we know the exact expected value. This commit makes the
test more precise.
2012-03-04 08:49:28 -05:00
Sebastian Huber
77998753b5 Use alternative API
Replaced Allocate_majority_of_workspace() with
rtems_workspace_allocate().  Replaced Allocate_majority_of_heap() with
rtems_heap_greedy_allocate().
2012-02-17 16:56:17 +01:00
Joel Sherrill
5d44355937 PR 1991/cpukit - attr.c (really mode code) warning rework
This PR was about a warning for no previous prototype for
rtems_interrupt_level_attribute. This method exists (like
a few others) to have real bodies for Classic API services
implemented as macros. These macros are not available from
anything but C and C++. The most explicit use was in the Ada
binding but these would be needed from assembly language
or any other non-C based language.

On top of needing a prototype, the methods were misnamed.
They were related to modes.  This renames them, moves the
file, fixes test code, etc.
2012-02-02 16:57:42 -06:00
Joel Sherrill
61250b4ce9 Remove all .cvsignore files. 2012-02-01 10:59:44 -06:00
Sebastian Huber
3b057ea2db Typo. 2011-12-14 13:19:52 +00:00
Sebastian Huber
46231e1330 2011-12-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR 1924/cpukit
	* spstkalloc02/.cvsignore, spstkalloc02/Makefile.am,
	spstkalloc02/init.c, spstkalloc02/spstkalloc02.doc,
	spstkalloc02/spstkalloc02.scn: New files.
	* Makefile.am, configure.ac: Reflect changes above.
2011-12-14 13:18:01 +00:00
Ralf Corsepius
849d4bbc80 2011-12-13 Ralf Corsépius <ralf.corsepius@rtems.org>
* sp31/task1.c: Make Do_nothing static.
	* sprbtree01/init.c: Make test_compare_function, rb_assert static.
2011-12-13 10:02:30 +00:00
Sebastian Huber
b1345b2494 2011-12-12 Sebastian Huber <sebastian.huber@embedded-brains.de>
* spwkspace/init.c: Test _Workspace_String_duplicate().
2011-12-12 15:18:18 +00:00
Joel Sherrill
d13eb6bf2c 2011-12-08 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1589/build
	* sp01/Makefile.am, sp02/Makefile.am, sp03/Makefile.am,
	sp04/Makefile.am, sp05/Makefile.am, sp06/Makefile.am,
	sp07/Makefile.am, sp08/Makefile.am, sp09/Makefile.am,
	sp10/Makefile.am, sp11/Makefile.am, sp12/Makefile.am,
	sp13/Makefile.am, sp14/Makefile.am, sp15/Makefile.am,
	sp16/Makefile.am, sp17/Makefile.am, sp18/Makefile.am,
	sp19/Makefile.am, sp20/Makefile.am, sp2038/Makefile.am,
	sp21/Makefile.am, sp22/Makefile.am, sp23/Makefile.am,
	sp24/Makefile.am, sp25/Makefile.am, sp26/Makefile.am,
	sp27/Makefile.am, sp27a/Makefile.am, sp28/Makefile.am,
	sp29/Makefile.am, sp30/Makefile.am, sp31/Makefile.am,
	sp32/Makefile.am, sp33/Makefile.am, sp34/Makefile.am,
	sp35/Makefile.am, sp36/Makefile.am, sp37/Makefile.am,
	sp38/Makefile.am, sp39/Makefile.am, sp40/Makefile.am,
	sp41/Makefile.am, sp42/Makefile.am, sp43/Makefile.am,
	sp44/Makefile.am, sp45/Makefile.am, sp46/Makefile.am,
	sp47/Makefile.am, sp48/Makefile.am, sp49/Makefile.am,
	sp50/Makefile.am, sp51/Makefile.am, sp52/Makefile.am,
	sp53/Makefile.am, sp54/Makefile.am, sp55/Makefile.am,
	sp56/Makefile.am, sp57/Makefile.am, sp58/Makefile.am,
	sp59/Makefile.am, sp60/Makefile.am, sp62/Makefile.am,
	sp63/Makefile.am, sp64/Makefile.am, sp65/Makefile.am,
	sp66/Makefile.am, sp67/Makefile.am, sp68/Makefile.am,
	sp69/Makefile.am, sp70/Makefile.am, sp71/Makefile.am,
	sp72/Makefile.am, sp73/Makefile.am, sp74/Makefile.am,
	sp75/Makefile.am, sp76/Makefile.am, spassoc01/Makefile.am,
	spcbssched01/Makefile.am, spcbssched02/Makefile.am,
	spcbssched03/Makefile.am, spchain/Makefile.am,
	spclockget/Makefile.am, spcoverage/Makefile.am,
	spedfsched01/Makefile.am, spedfsched02/Makefile.am,
	spedfsched03/Makefile.am, sperror01/Makefile.am,
	sperror02/Makefile.am, sperror03/Makefile.am, spfatal01/Makefile.am,
	spfatal02/Makefile.am, spfatal03/Makefile.am, spfatal04/Makefile.am,
	spfatal05/Makefile.am, spfatal06/Makefile.am, spfatal07/Makefile.am,
	spfatal08/Makefile.am, spfatal09/Makefile.am, spfatal10/Makefile.am,
	spfatal11/Makefile.am, spfatal12/Makefile.am, spfatal13/Makefile.am,
	spfatal14/Makefile.am, spfatal15/Makefile.am, spfatal16/Makefile.am,
	spfatal17/Makefile.am, spfatal18/Makefile.am, spfatal19/Makefile.am,
	spfatal20/Makefile.am, spfatal21/Makefile.am, spfatal22/Makefile.am,
	spfatal23/Makefile.am, spfatal24/Makefile.am, spfatal25/Makefile.am,
	spfifo01/Makefile.am, spfifo02/Makefile.am, spfifo03/Makefile.am,
	spfifo04/Makefile.am, spfifo05/Makefile.am, spheapprot/Makefile.am,
	spintrcritical01/Makefile.am, spintrcritical02/Makefile.am,
	spintrcritical03/Makefile.am, spintrcritical04/Makefile.am,
	spintrcritical05/Makefile.am, spintrcritical06/Makefile.am,
	spintrcritical07/Makefile.am, spintrcritical08/Makefile.am,
	spintrcritical09/Makefile.am, spintrcritical10/Makefile.am,
	spintrcritical11/Makefile.am, spintrcritical12/Makefile.am,
	spintrcritical13/Makefile.am, spintrcritical14/Makefile.am,
	spintrcritical15/Makefile.am, spintrcritical16/Makefile.am,
	spintrcritical17/Makefile.am, spmkdir/Makefile.am,
	spmountmgr01/Makefile.am, spnotepad01/Makefile.am,
	spnsext01/Makefile.am, spobjgetnext/Makefile.am,
	spprintk/Makefile.am, spprivenv01/Makefile.am,
	sprbtree01/Makefile.am, spsimplesched01/Makefile.am,
	spsimplesched02/Makefile.am, spsimplesched03/Makefile.am,
	spsize/Makefile.am, spstkalloc/Makefile.am, spthreadq01/Makefile.am,
	spwatchdog/Makefile.am, spwkspace/Makefile.am: Remove obsolete
	optional manager capability.
2011-12-08 21:38:41 +00:00
Sebastian Huber
13760c8b16 2011-12-06 Petr Benes <benesp16@fel.cvut.cz>
PR 1980/testing
	* spedfsched02/task1.c, spedfsched02/init.c: Fixed initialization.
2011-12-06 08:21:38 +00:00
Gedare Bloom
b431b6635d 2011-11-26 Gedare Bloom <gedare@rtems.org>
PR 1964
	* spchain/init.c, spchain/spchain.scn: Add testcases for chain is first
	and last
2011-11-26 18:07:52 +00:00
Sebastian Huber
ba136bd7ab 2011-11-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR 1924/cpukit
	* sptests/spfatal08/testcase.h, sptests/spfatal12/testcase.h: Update
	due to API changes.
2011-11-10 14:43:33 +00:00
Joel Sherrill
71d093f037 2011-10-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* sp2038/.cvsignore: New file.
2011-10-06 17:31:37 +00:00
Jennifer Averett
656f958759 Corrected changelog. 2011-10-05 14:12:40 +00:00
Jennifer Averett
b0a2a7aa23 2011-10-04 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR 1922
	* spcbssched02/system.h, spcbssched03/system.h, spedfsched02/system.h,
	spedfsched02/task1.c, spedfsched03/system.h: EDF and CBS scheduler:
	extern declarations fix.
2011-10-04 15:18:16 +00:00
Ralf Corsepius
f57f5ce2f8 2011-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* sp50/init.c, spclockget/init.c: Include "pritime.h".
	Use PRIdtime_t to print time_t.
2011-09-30 02:50:48 +00:00
Ralf Corsepius
b47a7ccb8d 2011-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Check for size of time_t.
2011-09-30 01:55:27 +00:00
Ralf Corsepius
4e8589da58 2011-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* sp75/init.c, spcbssched01/init.c, spcbssched01/task1.c
	spcbssched02/init.c, spcbssched02/task_periodic.c,
	spcbssched03/init.c, spcbssched03/tasks_aperiodic.c,
	spcbssched03/tasks_periodic.c, spedfsched01/init.c,
	spedfsched01/task1.c, spedfsched02/getall.c, spedfsched02/init.c,
	spedfsched02/task1.c, spedfsched03/init.c,
	spedfsched03/tasks_aperiodic.c, spedfsched03/tasks_periodic.c,
	sprbtree01/init.c: Add HAVE_CONFIG_H.
2011-09-29 16:20:49 +00:00