Commit Graph

47 Commits

Author SHA1 Message Date
Chris Johns
c49985691f Change all references of rtems.com to rtems.org. 2014-03-21 08:10:47 +11:00
Sebastian Huber
825cb1f196 score: Delete _Thread_Dispatch_set_disable_level()
This function was only used in some tests and can be replaced with other
functions.
2014-03-06 09:43:59 +01:00
Sebastian Huber
b323e1fb41 tmtests/tm26: Fix deadlock for SMP configurations
Some _Context_Switch() invocations end up in _Thread_Handler().  Create
the right context for this function.
2014-03-06 09:43:59 +01:00
Joel Sherrill
9410d01196 tmtests: Make output more uniform 2013-12-07 19:10:35 -06:00
Sebastian Huber
bf30999cc6 smp: Add and use _Assert_Owner_of_giant()
Add and use _ISR_Disable_without_giant() and
_ISR_Enable_without_giant() if RTEMS_SMP is defined.

On single processor systems the ISR disable/enable was the big hammer
which ensured system-wide mutual exclusion.  On SMP configurations this
no longer works since other processors do not care about disabled
interrupts on this processor and continue to execute freely.

On SMP in addition to ISR disable/enable an SMP lock must be used.
Currently we have only the Giant lock so we can check easily that ISR
disable/enable is used only in the right context.
2013-08-30 11:16:28 +02:00
Sebastian Huber
d19cce29dc score: Per-CPU thread dispatch disable level
Use a per-CPU thread dispatch disable level.  So instead of one global
thread dispatch disable level we have now one instance per processor.
This is a major performance improvement for SMP.  On non-SMP
configurations this may simplifiy the interrupt entry/exit code.

The giant lock is still present, but it is now decoupled from the thread
dispatching in _Thread_Dispatch(), _Thread_Handler(),
_Thread_Restart_self() and the interrupt entry/exit.   Access to the
giant lock is now available via _Giant_Acquire() and _Giant_Release().
The giant lock is still implicitly acquired via
_Thread_Dispatch_decrement_disable_level().

The giant lock is only acquired for high-level operations in interrupt
handlers (e.g. release of a semaphore, sending of an event).

As a side-effect this change fixes the lost thread dispatch necessary
indication bug in _Thread_Dispatch().

A per-CPU thread dispatch disable level greatly simplifies the SMP
support for the interrupt entry/exit code since no spin locks have to be
acquired in this area.  It is only necessary to get the current
processor index and use this to calculate the address of the own per-CPU
control.  This reduces the interrupt latency considerably.

All elements for the interrupt entry/exit code are now part of the
Per_CPU_Control structure: thread dispatch disable level, ISR nest level
and thread dispatch necessary.  Nothing else is required (except CPU
port specific stuff like on SPARC).
2013-08-09 23:02:38 +02:00
Sebastian Huber
e31a9c8b0d tmtests/tm26: Fixes for RTEMS_DEBUG 2013-07-31 15:09:04 +02:00
Sebastian Huber
2bbea657ae rtems: Create semaphore implementation header
Move implementation specific parts of sem.h and sem.inl into new header
file semimpl.h.  The sem.h contains now only the application visible
API.
2013-07-18 09:58:56 +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
Jennifer Averett
1c95d94af6 2011-04-21 Jennifer Averett <Jennifer.Averett@OARcorp.com
PR 1777/cpukit
	* support/include/tmacros.h, tmtests/tm26/task1.c,
	tmtests/tm27/task1.c: Consolidated access to
	_Thread_Dispatch_disable_level.
2011-04-21 19:05:34 +00:00
Joel Sherrill
a1a5f9225c 2011-03-16 Jennifer Averett <jennifer.averett@OARcorp.com>
PR 1743/cpu
	* tm26/task1.c, tm27/task1.c: Add Simple Priority Scheduler as
	complement to existing Deterministic Priority Scheduler. Modify these
	tests to verify the scheduler they are designed to work with is the
	default scheduler.
2011-03-16 17:11:32 +00:00
Sebastian Huber
67cf697636 2011-03-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
* tm26/task1.c: Update for API change.
2011-03-16 09:14:37 +00:00
Ralf Corsepius
a4bc4d6e29 Add HAVE_CONFIG_H. 2011-02-22 10:00:39 +00:00
Joel Sherrill
df0f27f655 2011-02-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* tm26/task1.c, tm27/task1.c: Adjust for name changes.
2011-02-18 15:12:55 +00:00
Sebastian Huber
b758b90679 2010-11-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
* tm26/task1.c, tm27/task1.c: Update for API changes.
2010-11-25 13:26:45 +00:00
Joel Sherrill
692775fa56 2010-11-24 Gedare Bloom <giddyup44@yahoo.com>
PR 1647/cpukit
	* tm26/task1.c, tm27/task1.c: Update documentation to reflect
	refactoring of SuperCore to add Scheduler Handler.
2010-11-24 16:06:37 +00:00
Sebastian Huber
0e34d4397f 2010-10-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
* tm26/task1.c, tm27/task1.c: Do not violate chain API.
2010-10-25 07:27:51 +00:00
Joel Sherrill
9d47cd1aef 2010-07-30 Gedare Bloom <giddyup44@yahoo.com>
PR 1599/cpukit
	* tm26/task1.c, tm27/task1.c: Rename _Context_Switch_necessary to
	_Thread_Dispatch_necessary to more properly reflect the intent.
2010-07-30 18:52:32 +00:00
Ralf Corsepius
937132ea3b Use true/false instead of TRUE/FALSE for "bool"s. 2009-11-01 04:10:20 +00:00
Joel Sherrill
1055ce20fc Fix most warnings. 2009-05-09 21:24:06 +00:00
Joel Sherrill
4389287a39 2008-12-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* tm01/task1.c, tm02/task1.c, tm03/task1.c, tm04/task1.c, tm05/task1.c,
	tm06/task1.c, tm07/task1.c, tm08/task1.c, tm09/task1.c, tm10/task1.c,
	tm11/task1.c, tm12/task1.c, tm13/task1.c, tm14/task1.c, tm16/task1.c,
	tm17/task1.c, tm18/task1.c, tm19/task1.c, tm20/task1.c, tm21/task1.c,
	tm23/task1.c, tm24/task1.c, tm25/task1.c, tm26/task1.c, tm27/task1.c,
	tm28/task1.c, tm29/task1.c, tmoverhd/testtask.c: Run all tests
	successfully with maxixum number of priorities as 16 instead of 256.
	This was done by temporarily modifying the score priority.h maximum.
	This allowed testing of all API code to ensure that it worked
	properly with a reduced number of priorities. Most modifications were
	to switch from hard-coded maximum to using the API provided methods
	to determine maximum number of priority levels.
2008-12-14 18:38:45 +00:00
Joel Sherrill
d30316c40c 2008-12-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* tm26/task1.c: Fix typo.
2008-12-08 16:15:43 +00:00
Joel Sherrill
dbf4f175ac 2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com>
* tm01/Makefile.am, tm01/task1.c, tm02/Makefile.am, tm02/task1.c,
	tm03/Makefile.am, tm03/task1.c, tm04/Makefile.am, tm04/task1.c,
	tm05/Makefile.am, tm05/task1.c, tm06/Makefile.am, tm06/task1.c,
	tm07/Makefile.am, tm07/task1.c, tm08/Makefile.am, tm08/task1.c,
	tm09/Makefile.am, tm09/task1.c, tm10/Makefile.am, tm10/task1.c,
	tm11/Makefile.am, tm11/task1.c, tm12/Makefile.am, tm12/task1.c,
	tm13/Makefile.am, tm13/task1.c, tm14/Makefile.am, tm14/task1.c,
	tm15/Makefile.am, tm15/task1.c, tm16/Makefile.am, tm16/task1.c,
	tm17/Makefile.am, tm17/task1.c, tm18/Makefile.am, tm18/task1.c,
	tm19/Makefile.am, tm19/task1.c, tm20/Makefile.am, tm20/task1.c,
	tm21/Makefile.am, tm21/task1.c, tm22/Makefile.am, tm22/task1.c,
	tm23/Makefile.am, tm23/task1.c, tm24/Makefile.am, tm24/task1.c,
	tm25/Makefile.am, tm25/task1.c, tm26/Makefile.am, tm26/task1.c,
	tm27/Makefile.am, tm27/task1.c, tm28/Makefile.am, tm28/task1.c,
	tm29/Makefile.am, tm29/task1.c, tmck/Makefile.am, tmck/task1.c,
	tmoverhd/Makefile.am, tmoverhd/testtask.c: Eliminate empty function
	from every benchmark timer driver. Fix spelling.
2008-08-31 17:21:47 +00:00
Joel Sherrill
4074e70b03 2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com>
* tm01/task1.c, tm02/task1.c, tm03/task1.c, tm04/task1.c, tm05/task1.c,
	tm06/task1.c, tm07/task1.c, tm08/task1.c, tm09/task1.c, tm10/task1.c,
	tm11/task1.c, tm12/task1.c, tm13/task1.c, tm14/task1.c, tm15/task1.c,
	tm16/task1.c, tm17/task1.c, tm18/task1.c, tm19/task1.c, tm20/task1.c,
	tm21/task1.c, tm22/task1.c, tm23/task1.c, tm24/task1.c, tm25/task1.c,
	tm26/task1.c, tm27/task1.c, tm28/task1.c, tm29/task1.c, tmck/task1.c,
	tmoverhd/testtask.c: Rename timer driver methods to follow RTEMS
	programming conventions.
2008-08-31 16:47:18 +00:00
Joel Sherrill
d1128e26a3 2008-01-31 Joel Sherrill <joel.sherrill@OARcorp.com>
* tm01/task1.c, tm02/task1.c, tm03/task1.c, tm04/task1.c, tm05/task1.c,
	tm06/task1.c, tm07/task1.c, tm08/task1.c, tm09/task1.c, tm10/task1.c,
	tm11/task1.c, tm12/task1.c, tm13/task1.c, tm14/task1.c, tm15/task1.c,
	tm16/task1.c, tm17/task1.c, tm18/task1.c, tm19/task1.c, tm20/task1.c,
	tm21/task1.c, tm22/task1.c, tm23/task1.c, tm24/task1.c, tm25/task1.c,
	tm26/task1.c, tm27/task1.c, tm28/task1.c, tm29/task1.c, tmck/task1.c,
	tmoverhd/testtask.c: Change TEST_INIT to CONFIGURE_INIT. Make
	tmacros.h available to all POSIX tests. Add a clock_settime case for
	< 1988.
2008-02-01 00:45:16 +00:00
Ralf Corsepius
8f71a36f71 Remove stray white spaces. 2004-04-20 07:09:31 +00:00
Ralf Corsepius
3239698d1f Remove stray white spaces. 2004-04-15 13:26:21 +00:00
Ralf Corsepius
0720ff433e 2004-03-28 Ralf Corsepius <ralf_corsepius@rtems.org>
* include/timesys.h, tm01/task1.c, tm02/task1.c, tm03/task1.c,
	tm04/task1.c, tm05/task1.c, tm06/task1.c, tm07/task1.c,
	tm08/task1.c, tm09/task1.c, tm10/task1.c, tm11/task1.c,
	tm12/task1.c, tm13/task1.c, tm14/task1.c, tm15/task1.c,
	tm16/task1.c, tm17/task1.c, tm18/task1.c, tm20/task1.c,
	tm21/task1.c, tm22/task1.c, tm23/task1.c, tm24/task1.c,
	tm25/task1.c, tm26/task1.c, tm27/task1.c, tm28/task1.c,
	tm29/task1.c, tmck/task1.c, tmoverhd/testtask.c: Convert to using
	c99 fixed size types.
2004-03-28 07:20:11 +00:00
Joel Sherrill
54a43fe433 2004-02-26 Joel Sherrill <joel@OARcorp.com>
PR 583/tests
	* tm26/task1.c, tm27/task1.c: Correctly reset
	_Thread_Dispatch_disable_level so printing is safe.
2004-02-26 16:50:21 +00:00
Joel Sherrill
95a81ab4eb 2003-09-04 Joel Sherrill <joel@OARcorp.com>
* include/timesys.h, tm01/system.h, tm01/task1.c, tm01/tm01.doc,
	tm02/system.h, tm02/task1.c, tm02/tm02.doc, tm03/system.h,
	tm03/task1.c, tm03/tm03.doc, tm04/system.h, tm04/task1.c,
	tm04/tm04.doc, tm05/system.h, tm05/task1.c, tm05/tm05.doc,
	tm06/system.h, tm06/task1.c, tm06/tm06.doc, tm07/system.h,
	tm07/task1.c, tm07/tm07.doc, tm08/system.h, tm08/task1.c,
	tm08/tm08.doc, tm09/system.h, tm09/task1.c, tm09/tm09.doc,
	tm10/system.h, tm10/task1.c, tm10/tm10.doc, tm11/system.h,
	tm11/task1.c, tm11/tm11.doc, tm12/system.h, tm12/task1.c,
	tm12/tm12.doc, tm13/system.h, tm13/task1.c, tm13/tm13.doc,
	tm14/system.h, tm14/task1.c, tm14/tm14.doc, tm15/system.h,
	tm15/task1.c, tm15/tm15.doc, tm16/system.h, tm16/task1.c,
	tm16/tm16.doc, tm17/system.h, tm17/task1.c, tm17/tm17.doc,
	tm18/system.h, tm18/task1.c, tm18/tm18.doc, tm19/system.h,
	tm19/task1.c, tm19/tm19.doc, tm20/system.h, tm20/task1.c,
	tm20/tm20.doc, tm21/system.h, tm21/task1.c, tm21/tm21.doc,
	tm22/system.h, tm22/task1.c, tm22/tm22.doc, tm23/system.h,
	tm23/task1.c, tm23/tm23.doc, tm24/system.h, tm24/task1.c,
	tm24/tm24.doc, tm25/system.h, tm25/task1.c, tm25/tm25.doc,
	tm26/fptest.h, tm26/system.h, tm26/task1.c, tm26/tm26.doc,
	tm27/system.h, tm27/task1.c, tm27/tm27.doc, tm28/system.h,
	tm28/task1.c, tm28/tm28.doc, tm29/system.h, tm29/task1.c,
	tm29/tm29.doc, tmck/system.h, tmck/task1.c, tmck/tmck.doc,
	tmoverhd/dumrtems.h, tmoverhd/empty.c, tmoverhd/system.h,
	tmoverhd/testtask.c, tmoverhd/tmoverhd.doc: URL for license changed.
2003-09-04 18:53:55 +00:00
Joel Sherrill
b454bc9149 2002-08-01 Joel Sherrill <joel@OARcorp.com>
* Per PR47 add support for buffered test output.  This involved
	adding defines to redirect output to a buffer and dump it when
	full, at "test pause", and at exit.  To avoid problems when redefining
	exit(), all tests were modified to call rtems_test_exit().
	Some tests, notable psxtests, had to be modified to include
	the standard test macro .h file (pmacros.h or tmacros.h) to
	enable this support.
	* include/timesys.h, tm01/task1.c, tm02/task1.c, tm03/task1.c,
	tm04/task1.c, tm05/task1.c, tm06/task1.c, tm07/task1.c, tm08/task1.c,
	tm09/task1.c, tm10/task1.c, tm11/task1.c, tm12/task1.c, tm13/task1.c,
	tm14/task1.c, tm15/task1.c, tm16/task1.c, tm17/task1.c, tm18/task1.c,
	tm19/task1.c, tm20/task1.c, tm21/task1.c, tm22/task1.c, tm23/task1.c,
	tm24/task1.c, tm25/task1.c, tm26/task1.c, tm27/task1.c, tm28/task1.c,
	tm29/task1.c, tmck/task1.c, tmoverhd/testtask.c: Modified.
2002-08-02 00:52:37 +00:00
Joel Sherrill
ca7858bb88 Port of RTEMS to the Texas Instruments C3x/C4x DSP families including
a BSP (c4xsim) supporting the simulator included with gdb.  This port
was done by Joel Sherrill and Jennifer Averett of OAR Corporation.
Also included with this port is a space/time optimization to eliminate
FP context switch management on CPUs without hardware or software FP.

An issue with this port was that sizeof(unsigned32) = sizeof(unsigned8)
on this CPU.  This required addressing alignment checks and assumptions
as well as fixing code that assumed sizeof(unsigned32) == 4.
2000-07-26 19:28:11 +00:00
Joel Sherrill
08311cc3a9 Updated copyright notice. 1999-11-17 17:51:34 +00:00
Joel Sherrill
3d67661f9d Added nesting count for suspend/resume. 1999-11-09 23:10:48 +00:00
Joel Sherrill
2617b3450b Restructured so all times are placed in variables and printed in batch
mode at the end of the test.  This eliminates the possibility of IO
blocking a task unexpectedly and messing up the test.
1998-02-19 17:08:54 +00:00
Joel Sherrill
60b791ada1 updated copyright to 1998 1998-02-17 23:46:28 +00:00
Joel Sherrill
98e4ebf594 Fixed typo in the pointer to the license terms. 1997-10-08 15:45:54 +00:00
Joel Sherrill
03f2154e51 headers updated to reflect new style copyright notice as part
of switching to the modified GNU GPL.
1997-04-22 17:20:27 +00:00
Joel Sherrill
e6424462c3 As part of reducing visibility into rtems and hiding the .inl files
from the application code, this file required more visibility than
is given by default to application code.
1996-03-06 21:37:43 +00:00
Joel Sherrill
5c491aef41 changes remerged after lost in disk crash -- recovered from snapshot, partially recovered working tree, etc 1995-12-20 15:39:19 +00:00
Joel Sherrill
3652ad356b Minor bug fixes to get all targets compilable and running. The
single biggest changes were the expansion of the workspace size
macro to include other types of objects and the increase in the
minimum stack size for most CPUs.
1995-09-19 14:53:29 +00:00
Joel Sherrill
3a4ae6c210 The word "RTEMS" almost completely removed from the core.
Configuration Table Template file added and all tests
modified to use this.  All gvar.h and conftbl.h files
removed from test directories.

Configuration parameter maximum_devices added.

Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.

Initialization sequence changed to invoke API specific initialization
routines.  Initialization tasks table now owned by RTEMS Tasks Manager.

Added user extension for post-switch.

Utilized user extensions to implement API specific functionality
like signal dispatching.

Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized.  These are largely equivalent to the
pre-driver and post-driver hooks.

Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.

All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver.  Also merged clock isr into
main file and removed ckisr.c where possible.

Updated spsize to reflect new and moved variables.

Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.

Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.
1995-09-11 19:35:39 +00:00
Joel Sherrill
7f6a24abdd Added unused priority ceiling parameter to rtems_semaphore_create.
Rearranged code to created thread handler routines to initialize,
start, restart, and "close/delete" a thread.

Made internal threads their own object class.  This now uses the
thread support routines for starting and initializing a thread.

Insured deleted tasks are freed to the Inactive pool associated with the
correct Information block.

Added an RTEMS API specific data area to the thread control block.

Beginnings of removing the word "rtems" from the core.
1995-08-28 15:30:29 +00:00
Joel Sherrill
3235ad9a2c Support for variable length names added to Object Handler. This supports
both fixed length "raw" names and strings from the API's point of view.

Both inline and macro implementations were tested.
1995-08-23 19:30:23 +00:00
Joel Sherrill
795030965e Added test cases:
+ some from Andy Bray (andy@i-cubed.demon.co.uk) which do not include
    task start up cost.
  + cases for interrupt disable, enable, and flash
1995-08-02 19:56:51 +00:00
Joel Sherrill
459f770f5e added calls to _Thread_Disable_dispatch to match requirements
for invocation of _Thread_Handler
1995-06-05 23:55:00 +00:00
Joel Sherrill
ac7d5ef06a Initial revision 1995-05-11 17:39:37 +00:00