mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-27 23:10:16 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7dc3529ea4 |
@@ -21,10 +21,10 @@ The following persons/organizations have made contributions:
|
||||
Research to port RTEMS to the Hewlett-Packard PA-RISC architecture (V1.1)
|
||||
and the addition of HP-UX as a development host. Tony Bennett
|
||||
(tbennett@divnc.com) was assisted in this effort by Joel Sherrill
|
||||
(joel@OARcorp.com). Tony also deserves a big pat on the back for
|
||||
contributing significantly to the overall organization of the development
|
||||
environment and directory structure. RTEMS is much easier to build
|
||||
because of Tony.
|
||||
(jsherril@redstone.army.mil). Tony also deserves a big pat on the
|
||||
back for contributing significantly to the overall organization
|
||||
of the development environment and directory structure. RTEMS
|
||||
is much easier to build because of Tony.
|
||||
|
||||
+ Greg Allen of Division Inc. of Chapel Hill, NC for
|
||||
porting RTEMS to HP-UX. This port treats a UNIX computer as simply
|
||||
@@ -75,10 +75,6 @@ The following persons/organizations have made contributions:
|
||||
Laboratory submitted the support for the Motorola MC68360 CPU
|
||||
including the `gen68360' BSP.
|
||||
|
||||
+ Dominique le Campion (Dominique.LECAMPION@enst-bretagne.fr), for
|
||||
Telecom Bretagne and T.N.I. (Brest, France) submitted the BSP for
|
||||
the Motorola MVME147 board (68030 CPU + 68881 FPU).
|
||||
|
||||
Finally, the RTEMS project would like to thank those who have contributed
|
||||
to the other free software efforts which RTEMS utilizes. The primary RTEMS
|
||||
development environment is from the Free Software Foundation (the GNU
|
||||
|
||||
@@ -34,14 +34,13 @@
|
||||
#define MALLOC_0_RETURNS_NULL
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/times.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/ipc.h>
|
||||
@@ -55,16 +54,16 @@
|
||||
|
||||
typedef struct {
|
||||
jmp_buf regs;
|
||||
unsigned32 isr_level;
|
||||
sigset_t isr_level;
|
||||
} Context_Control_overlay;
|
||||
|
||||
void _CPU_Signal_initialize(void);
|
||||
void _CPU_Stray_signal(int);
|
||||
void _CPU_ISR_Handler(int);
|
||||
|
||||
static sigset_t _CPU_Signal_mask;
|
||||
static Context_Control_overlay _CPU_Context_Default_with_ISRs_enabled;
|
||||
static Context_Control_overlay _CPU_Context_Default_with_ISRs_disabled;
|
||||
sigset_t _CPU_Signal_mask;
|
||||
Context_Control _CPU_Context_Default_with_ISRs_enabled;
|
||||
Context_Control _CPU_Context_Default_with_ISRs_disabled;
|
||||
|
||||
/*
|
||||
* Which cpu are we? Used by libcpu and libbsp.
|
||||
@@ -92,7 +91,7 @@ void _CPU_ISR_From_CPU_Init()
|
||||
|
||||
/*
|
||||
* Block all the signals except SIGTRAP for the debugger
|
||||
* and fatal error signals.
|
||||
* and SIGABRT for fatal errors.
|
||||
*/
|
||||
|
||||
(void) sigfillset(&_CPU_Signal_mask);
|
||||
@@ -100,9 +99,6 @@ void _CPU_ISR_From_CPU_Init()
|
||||
(void) sigdelset(&_CPU_Signal_mask, SIGABRT);
|
||||
(void) sigdelset(&_CPU_Signal_mask, SIGIOT);
|
||||
(void) sigdelset(&_CPU_Signal_mask, SIGCONT);
|
||||
(void) sigdelset(&_CPU_Signal_mask, SIGSEGV);
|
||||
(void) sigdelset(&_CPU_Signal_mask, SIGBUS);
|
||||
(void) sigdelset(&_CPU_Signal_mask, SIGFPE);
|
||||
|
||||
_CPU_ISR_Enable(1);
|
||||
|
||||
@@ -123,16 +119,20 @@ void _CPU_Signal_initialize( void )
|
||||
{
|
||||
struct sigaction act;
|
||||
sigset_t mask;
|
||||
|
||||
|
||||
/* mark them all active except for TraceTrap and Abort */
|
||||
|
||||
mask = _CPU_Signal_mask;
|
||||
|
||||
sigfillset(&mask);
|
||||
sigdelset(&mask, SIGTRAP);
|
||||
sigdelset(&mask, SIGABRT);
|
||||
sigdelset(&mask, SIGIOT);
|
||||
sigdelset(&mask, SIGCONT);
|
||||
sigprocmask(SIG_UNBLOCK, &mask, 0);
|
||||
|
||||
|
||||
act.sa_handler = _CPU_ISR_Handler;
|
||||
act.sa_mask = mask;
|
||||
act.sa_flags = SA_RESTART;
|
||||
|
||||
|
||||
sigaction(SIGHUP, &act, 0);
|
||||
sigaction(SIGINT, &act, 0);
|
||||
sigaction(SIGQUIT, &act, 0);
|
||||
@@ -166,6 +166,7 @@ void _CPU_Signal_initialize( void )
|
||||
#ifdef SIGLOST
|
||||
sigaction(SIGLOST, &act, 0);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
@@ -207,14 +208,14 @@ void _CPU_Context_From_CPU_Init()
|
||||
|
||||
_CPU_ISR_Set_level( 0 );
|
||||
_CPU_Context_switch(
|
||||
(Context_Control *) &_CPU_Context_Default_with_ISRs_enabled,
|
||||
(Context_Control *) &_CPU_Context_Default_with_ISRs_enabled
|
||||
&_CPU_Context_Default_with_ISRs_enabled,
|
||||
&_CPU_Context_Default_with_ISRs_enabled
|
||||
);
|
||||
|
||||
|
||||
_CPU_ISR_Set_level( 1 );
|
||||
_CPU_Context_switch(
|
||||
(Context_Control *) &_CPU_Context_Default_with_ISRs_disabled,
|
||||
(Context_Control *) &_CPU_Context_Default_with_ISRs_disabled
|
||||
&_CPU_Context_Default_with_ISRs_disabled,
|
||||
&_CPU_Context_Default_with_ISRs_disabled
|
||||
);
|
||||
}
|
||||
|
||||
@@ -223,16 +224,21 @@ void _CPU_Context_From_CPU_Init()
|
||||
* _CPU_ISR_Get_level
|
||||
*/
|
||||
|
||||
sigset_t GET_old_mask;
|
||||
|
||||
unsigned32 _CPU_ISR_Get_level( void )
|
||||
{
|
||||
sigset_t old_mask;
|
||||
/* sigset_t old_mask; */
|
||||
unsigned32 old_level;
|
||||
|
||||
sigprocmask(SIG_BLOCK, 0, &old_mask);
|
||||
sigprocmask(0, 0, &GET_old_mask);
|
||||
|
||||
if (memcmp((void *)&posix_empty_mask, (void *)&old_mask, sizeof(sigset_t)))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
if (memcmp((void *)&posix_empty_mask, (void *)&GET_old_mask, sizeof(sigset_t)))
|
||||
old_level = 1;
|
||||
else
|
||||
old_level = 0;
|
||||
|
||||
return old_level;
|
||||
}
|
||||
|
||||
/* _CPU_Initialize
|
||||
@@ -354,15 +360,8 @@ void _CPU_Install_interrupt_stack( void )
|
||||
|
||||
void _CPU_Thread_Idle_body( void )
|
||||
{
|
||||
while (1) {
|
||||
#ifdef RTEMS_DEBUG
|
||||
/* interrupts had better be enabled at this point! */
|
||||
if (_CPU_ISR_Get_level() != 0)
|
||||
abort();
|
||||
#endif
|
||||
while (1)
|
||||
pause();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
@@ -379,6 +378,7 @@ void _CPU_Context_Initialize(
|
||||
boolean _is_fp
|
||||
)
|
||||
{
|
||||
void *source;
|
||||
unsigned32 *addr;
|
||||
unsigned32 jmp_addr;
|
||||
unsigned32 _stack_low; /* lowest "stack aligned" address */
|
||||
@@ -409,12 +409,16 @@ void _CPU_Context_Initialize(
|
||||
*/
|
||||
|
||||
if ( _new_level == 0 )
|
||||
*_the_context = *(Context_Control *)
|
||||
&_CPU_Context_Default_with_ISRs_enabled;
|
||||
source = &_CPU_Context_Default_with_ISRs_enabled;
|
||||
else
|
||||
*_the_context = *(Context_Control *)
|
||||
&_CPU_Context_Default_with_ISRs_disabled;
|
||||
source = &_CPU_Context_Default_with_ISRs_disabled;
|
||||
|
||||
memcpy(
|
||||
_the_context,
|
||||
source,
|
||||
sizeof(Context_Control) /* sizeof(jmp_buf)); */
|
||||
);
|
||||
|
||||
addr = (unsigned32 *)_the_context;
|
||||
|
||||
#if defined(hppa1_1)
|
||||
@@ -487,7 +491,7 @@ void _CPU_Context_restore(
|
||||
{
|
||||
Context_Control_overlay *nextp = (Context_Control_overlay *)next;
|
||||
|
||||
_CPU_ISR_Enable(nextp->isr_level);
|
||||
sigprocmask( SIG_SETMASK, &nextp->isr_level, 0 );
|
||||
longjmp( nextp->regs, 0 );
|
||||
}
|
||||
|
||||
@@ -496,11 +500,6 @@ void _CPU_Context_restore(
|
||||
* _CPU_Context_switch
|
||||
*/
|
||||
|
||||
static void do_jump(
|
||||
Context_Control_overlay *currentp,
|
||||
Context_Control_overlay *nextp
|
||||
);
|
||||
|
||||
void _CPU_Context_switch(
|
||||
Context_Control *current,
|
||||
Context_Control *next
|
||||
@@ -508,50 +507,33 @@ void _CPU_Context_switch(
|
||||
{
|
||||
Context_Control_overlay *currentp = (Context_Control_overlay *)current;
|
||||
Context_Control_overlay *nextp = (Context_Control_overlay *)next;
|
||||
#if 0
|
||||
int status;
|
||||
#endif
|
||||
|
||||
currentp->isr_level = _CPU_ISR_Disable_support();
|
||||
|
||||
do_jump( currentp, nextp );
|
||||
|
||||
#if 0
|
||||
if (sigsetjmp(currentp->regs, 1) == 0) { /* Save the current context */
|
||||
siglongjmp(nextp->regs, 0); /* Switch to the new context */
|
||||
_Internal_error_Occurred(
|
||||
INTERNAL_ERROR_CORE,
|
||||
TRUE,
|
||||
status
|
||||
);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RTEMS_DEBUG
|
||||
if (_CPU_ISR_Get_level() == 0)
|
||||
abort();
|
||||
#endif
|
||||
|
||||
_CPU_ISR_Enable(currentp->isr_level);
|
||||
}
|
||||
|
||||
static void do_jump(
|
||||
Context_Control_overlay *currentp,
|
||||
Context_Control_overlay *nextp
|
||||
)
|
||||
{
|
||||
int status;
|
||||
|
||||
/*
|
||||
* Switch levels in one operation
|
||||
*/
|
||||
|
||||
status = sigprocmask( SIG_SETMASK, &nextp->isr_level, ¤tp->isr_level );
|
||||
if ( status )
|
||||
_Internal_error_Occurred(
|
||||
INTERNAL_ERROR_CORE,
|
||||
TRUE,
|
||||
status
|
||||
);
|
||||
|
||||
if (setjmp(currentp->regs) == 0) { /* Save the current context */
|
||||
longjmp(nextp->regs, 0); /* Switch to the new context */
|
||||
_Internal_error_Occurred(
|
||||
if ( status )
|
||||
_Internal_error_Occurred(
|
||||
INTERNAL_ERROR_CORE,
|
||||
TRUE,
|
||||
status
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
* _CPU_Save_float_context
|
||||
@@ -731,7 +713,6 @@ void _CPU_Stray_signal(int sig_num)
|
||||
case SIGBUS:
|
||||
case SIGSEGV:
|
||||
case SIGTERM:
|
||||
case SIGIOT:
|
||||
_CPU_Fatal_error(0x100 + sig_num);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,8 +436,8 @@ extern "C" {
|
||||
/*
|
||||
* This is really just the area for the following fields.
|
||||
*
|
||||
* jmp_buf regs;
|
||||
* unsigned32 isr_level;
|
||||
* jmp_buf regs;
|
||||
* sigset_t isr_level;
|
||||
*
|
||||
* Doing it this way avoids conflicts between the native stuff and the
|
||||
* RTEMS stuff.
|
||||
|
||||
@@ -100,7 +100,7 @@ typedef enum {
|
||||
|
||||
#define OBJECTS_CLASSES_FIRST OBJECTS_NO_CLASS
|
||||
#define OBJECTS_CLASSES_LAST OBJECTS_POSIX_CONDITION_VARIABLES
|
||||
#define OBJECTS_CLASSES_FIRST_THREAD_CLASS OBJECTS_INTERNAL_THREADS
|
||||
#define OBJECTS_CLASSES_FIRST_THREAD_CLASS OBJECTS_MPCI_PACKETS
|
||||
#define OBJECTS_CLASSES_LAST_THREAD_CLASS OBJECTS_POSIX_THREADS
|
||||
|
||||
/*
|
||||
|
||||
@@ -630,7 +630,7 @@ void _Thread_Close(
|
||||
(void) _Workspace_Free( the_thread->Start.fp_context );
|
||||
|
||||
if ( the_thread->Start.stack )
|
||||
(void) _Thread_Stack_Free( the_thread->Start.stack );
|
||||
(void) _Workspace_Free( the_thread->Start.stack );
|
||||
|
||||
if ( the_thread->extensions )
|
||||
(void) _Workspace_Free( the_thread->extensions );
|
||||
@@ -995,25 +995,10 @@ void _Thread_Load_environment(
|
||||
*
|
||||
* _Thread_Handler
|
||||
*
|
||||
* This routine is the "primal" entry point for all threads.
|
||||
* _Context_Initialize() dummies up the thread's initial context
|
||||
* to cause the first Context_Switch() to jump to _Thread_Handler().
|
||||
*
|
||||
* This routine is the default thread exitted error handler. It is
|
||||
* returned to when a thread exits. The configured fatal error handler
|
||||
* is invoked to process the exit.
|
||||
*
|
||||
* NOTE:
|
||||
*
|
||||
* On entry, it is assumed all interrupts are blocked and that this
|
||||
* routine needs to set the initial isr level. This may or may not
|
||||
* actually be needed by the context switch routine and as a result
|
||||
* interrupts may already be at there proper level. Either way,
|
||||
* setting the initial isr level properly here is safe.
|
||||
*
|
||||
* Currently this is only really needed for the posix port,
|
||||
* ref: _Context_Switch in unix/cpu.c
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
@@ -1021,18 +1006,9 @@ void _Thread_Load_environment(
|
||||
|
||||
void _Thread_Handler( void )
|
||||
{
|
||||
ISR_Level level;
|
||||
Thread_Control *executing;
|
||||
|
||||
|
||||
executing = _Thread_Executing;
|
||||
|
||||
/*
|
||||
* have to put level into a register for those cpu's that use
|
||||
* inline asm here
|
||||
*/
|
||||
|
||||
level = executing->Start.isr_level;
|
||||
_ISR_Enable(level);
|
||||
|
||||
/*
|
||||
* Take care that 'begin' extensions get to complete before
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
#include <signal.h>
|
||||
|
||||
typedef struct {
|
||||
jmp_buf regs;
|
||||
int isr_level;
|
||||
jmp_buf regs;
|
||||
sigset_t isr_level;
|
||||
} Context_Control;
|
||||
|
||||
int main(
|
||||
|
||||
@@ -81,10 +81,10 @@ SECTIONS {
|
||||
|
||||
_HeapStart = .;
|
||||
__HeapStart = .;
|
||||
. += HeapSize; /* XXX -- Old gld can't handle this */
|
||||
. += StackSize; /* XXX -- Old gld can't handle this */
|
||||
/* . += 0x10000; */ /* HeapSize for old gld */
|
||||
/* . += 0x1000; */ /* StackSize for old gld */
|
||||
/* . += HeapSize; */ /* XXX -- Old gld can't handle this */
|
||||
/* . += StackSize; */ /* XXX -- Old gld can't handle this */
|
||||
. += 0x10000; /* HeapSize for old gld */
|
||||
. += 0x1000; /* StackSize for old gld */
|
||||
. = ALIGN (16);
|
||||
stack_init = .;
|
||||
clear_end = .;
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
Notes about the MVME147 bsp
|
||||
|
||||
MVME147 port for TNI - Telecom Bretagne
|
||||
by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
May 1996
|
||||
|
||||
|
||||
This bsp is essentially based on the mvme136 bsp.
|
||||
|
||||
Summary of the modifications that were made:
|
||||
|
||||
* include
|
||||
|
||||
- bsp.h
|
||||
Peripheral Channel Controller memory mapping
|
||||
Z8530 memory mapping
|
||||
|
||||
* startup
|
||||
|
||||
- bspstart.c
|
||||
main () setup for VME roundrobin mode
|
||||
setup for the PCC interrupt vector base
|
||||
- bspclean.c
|
||||
bsp_cleanup () disable timer 1 & 2 interruptions
|
||||
- linkcmds set the RAM start (0x5000) and size (4Meg - 0x5000)
|
||||
- setvec.c unchanged
|
||||
- sbrk.c unchanged
|
||||
|
||||
* console
|
||||
|
||||
- console.c taken from the dmv152 bsp (Zilog Z8530)
|
||||
with no modification
|
||||
|
||||
* clock
|
||||
|
||||
- ckinit.c entirely rewritten for the PCC tick timer 2
|
||||
|
||||
* timer
|
||||
|
||||
- timerisr.s and timer.c
|
||||
entirely rewritten for the PCC tick timer 1
|
||||
now gives results un 6.25 us units (mininum timer delay,
|
||||
suprising big grain)
|
||||
|
||||
* times
|
||||
|
||||
- updated results for the mvme147 (beware of the 6.25 us grain)
|
||||
|
||||
* Makefiles
|
||||
|
||||
- compilation of shmsupp simply removed
|
||||
|
||||
|
||||
To be done:
|
||||
|
||||
* add VMEchip memory mapping to include/bsp.h
|
||||
|
||||
* update the overheads in coverhead.h
|
||||
|
||||
* add support for serila ports 2,3 and 4.
|
||||
|
||||
Other notes:
|
||||
|
||||
* There is no MP support (no more shmsupp) because I have no
|
||||
experience of the VME bus. The mvme136 shared memory support
|
||||
does not seem applicable on the VMEchip of the mvme147, so
|
||||
I don't know where to start. Suggestions are welcome.
|
||||
|
||||
* All the timing tests and sp tests have been run except tmoverhd.
|
||||
The test hangs during the pause (where the task should be suspended
|
||||
until a return). Maybe the rtems_initialize_executive is no more
|
||||
reentrant with this bsp.
|
||||
|
||||
Future work:
|
||||
|
||||
* Add gdb serial remote support.
|
||||
|
||||
* Shared memory support (I don't really need it, but I can do
|
||||
it if it's simple).
|
||||
|
||||
* Message passing on VME bus, with Ada 95 annex E (distributed
|
||||
systems) in mind.
|
||||
@@ -1,142 +0,0 @@
|
||||
/* Clock_init()
|
||||
*
|
||||
* This routine initializes the Tick Timer 2 on the MVME147 board.
|
||||
* The tick frequency is 1 millisecond.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* MVME147 port for TNI - Telecom Bretagne
|
||||
* by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
* May 1996
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
|
||||
#define MS_COUNT 65376 /* 1ms */
|
||||
/* MS_COUNT = 0x10000 - 1e-3/6.25e-6 */
|
||||
#define CLOCK_INT_LEVEL 6 /* T2's interrupt level */
|
||||
|
||||
rtems_unsigned32 Clock_isrs; /* ISRs until next tick */
|
||||
volatile rtems_unsigned32 Clock_driver_ticks; /* ticks since initialization */
|
||||
rtems_isr_entry Old_ticker;
|
||||
|
||||
void Clock_exit( void );
|
||||
|
||||
/*
|
||||
* These are set by clock driver during its init
|
||||
*/
|
||||
|
||||
rtems_device_major_number rtems_clock_major = ~0;
|
||||
rtems_device_minor_number rtems_clock_minor;
|
||||
|
||||
|
||||
/*
|
||||
* ISR Handler
|
||||
*/
|
||||
|
||||
rtems_isr Clock_isr(rtems_vector_number vector)
|
||||
{
|
||||
Clock_driver_ticks += 1;
|
||||
pcc->timer2_int_control |= 0x80; /* Acknowledge interr. */
|
||||
|
||||
if (Clock_isrs == 1) {
|
||||
rtems_clock_tick();
|
||||
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
|
||||
}
|
||||
else
|
||||
Clock_isrs -= 1;
|
||||
}
|
||||
|
||||
void Install_clock(rtems_isr_entry clock_isr )
|
||||
{
|
||||
|
||||
Clock_driver_ticks = 0;
|
||||
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
|
||||
|
||||
if ( BSP_Configuration.ticks_per_timeslice ) {
|
||||
Old_ticker =
|
||||
(rtems_isr_entry) set_vector( clock_isr, TIMER_2_VECTOR, 1 );
|
||||
|
||||
pcc->timer2_int_control = 0x00; /* Disable T2 Interr. */
|
||||
pcc->timer2_preload = MS_COUNT;
|
||||
/* write preload value */
|
||||
pcc->timer2_control = 0x07; /* clear T2 overflow counter, enable counter */
|
||||
pcc->timer2_int_control = CLOCK_INT_LEVEL|0x08;
|
||||
/* Enable Timer 2 and set its int. level */
|
||||
|
||||
atexit( Clock_exit );
|
||||
}
|
||||
}
|
||||
|
||||
void Clock_exit( void )
|
||||
{
|
||||
if ( BSP_Configuration.ticks_per_timeslice ) {
|
||||
pcc->timer2_int_control = 0x00; /* Disable T2 Interr. */
|
||||
}
|
||||
}
|
||||
|
||||
rtems_device_driver Clock_initialize(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void *pargp
|
||||
)
|
||||
{
|
||||
Install_clock( Clock_isr );
|
||||
|
||||
/*
|
||||
* make major/minor avail to others such as shared memory driver
|
||||
*/
|
||||
|
||||
rtems_clock_major = major;
|
||||
rtems_clock_minor = minor;
|
||||
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
rtems_device_driver Clock_control(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void *pargp
|
||||
)
|
||||
{
|
||||
rtems_unsigned32 isrlevel;
|
||||
rtems_libio_ioctl_args_t *args = pargp;
|
||||
|
||||
if (args == 0)
|
||||
goto done;
|
||||
|
||||
/*
|
||||
* This is hokey, but until we get a defined interface
|
||||
* to do this, it will just be this simple...
|
||||
*/
|
||||
|
||||
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
|
||||
{
|
||||
Clock_isr(TIMER_2_VECTOR);
|
||||
}
|
||||
else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
|
||||
{
|
||||
rtems_interrupt_disable( isrlevel );
|
||||
(void) set_vector( args->buffer, TIMER_2_VECTOR, 1 );
|
||||
rtems_interrupt_enable( isrlevel );
|
||||
}
|
||||
|
||||
done:
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
@@ -1,258 +0,0 @@
|
||||
/*
|
||||
* This file contains the MVME147 console IO package.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* MVME147 port for TNI - Telecom Bretagne
|
||||
* by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
* May 1996
|
||||
*
|
||||
* This file was taken from the DMV152 bsp
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#define M147_INIT
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
#include <z8530.h>
|
||||
|
||||
|
||||
/* console_initialize
|
||||
*
|
||||
* This routine initializes the console IO driver.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values:
|
||||
*/
|
||||
|
||||
rtems_device_driver console_initialize(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void *arg
|
||||
)
|
||||
{
|
||||
rtems_status_code status;
|
||||
|
||||
status = rtems_io_register_name(
|
||||
"/dev/console",
|
||||
major,
|
||||
(rtems_device_minor_number) 0
|
||||
);
|
||||
|
||||
if (status != RTEMS_SUCCESSFUL)
|
||||
rtems_fatal_error_occurred(status);
|
||||
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
/* is_character_ready
|
||||
*
|
||||
* This routine returns TRUE if a character is available.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values:
|
||||
*/
|
||||
|
||||
rtems_boolean is_character_ready(
|
||||
char *ch
|
||||
)
|
||||
{
|
||||
rtems_unsigned8 rr_0;
|
||||
|
||||
for ( ; ; ) {
|
||||
Z8x30_READ_CONTROL( CONSOLE_CONTROL, RR_0, rr_0 );
|
||||
if ( !(rr_0 & RR_0_RX_DATA_AVAILABLE) )
|
||||
return( FALSE );
|
||||
|
||||
Z8x30_READ_DATA( CONSOLE_DATA, *ch );
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
/* inbyte
|
||||
*
|
||||
* This routine reads a character from the SCC.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* Return values:
|
||||
* character read from SCC
|
||||
*/
|
||||
|
||||
char inbyte( void )
|
||||
{
|
||||
rtems_unsigned8 rr_0;
|
||||
char ch;
|
||||
|
||||
for ( ; ; ) {
|
||||
Z8x30_READ_CONTROL( CONSOLE_CONTROL, RR_0, rr_0 );
|
||||
if ( (rr_0 & RR_0_RX_DATA_AVAILABLE) != 0 )
|
||||
break;
|
||||
}
|
||||
|
||||
Z8x30_READ_DATA( CONSOLE_DATA, ch );
|
||||
return ( ch );
|
||||
}
|
||||
|
||||
/* outbyte
|
||||
*
|
||||
* This routine transmits a character out the SCC. It supports
|
||||
* XON/XOFF flow control.
|
||||
*
|
||||
* Input parameters:
|
||||
* ch - character to be transmitted
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*/
|
||||
|
||||
void outbyte(
|
||||
char ch
|
||||
)
|
||||
{
|
||||
rtems_unsigned8 rr_0;
|
||||
char flow_control;
|
||||
|
||||
for ( ; ; ) {
|
||||
Z8x30_READ_CONTROL( CONSOLE_CONTROL, RR_0, rr_0 );
|
||||
if ( (rr_0 & RR_0_TX_BUFFER_EMPTY) != 0 )
|
||||
break;
|
||||
}
|
||||
|
||||
for ( ; ; ) {
|
||||
Z8x30_READ_CONTROL( CONSOLE_CONTROL, RR_0, rr_0 );
|
||||
if ( (rr_0 & RR_0_RX_DATA_AVAILABLE) == 0 )
|
||||
break;
|
||||
|
||||
Z8x30_READ_DATA( CONSOLE_DATA, flow_control );
|
||||
|
||||
if ( flow_control == XOFF )
|
||||
do {
|
||||
do {
|
||||
Z8x30_READ_CONTROL( CONSOLE_CONTROL, RR_0, rr_0 );
|
||||
} while ( (rr_0 & RR_0_RX_DATA_AVAILABLE) == 0 );
|
||||
Z8x30_READ_DATA( CONSOLE_DATA, flow_control );
|
||||
} while ( flow_control != XON );
|
||||
}
|
||||
|
||||
Z8x30_WRITE_DATA( CONSOLE_DATA, ch );
|
||||
}
|
||||
|
||||
/*
|
||||
* Open entry point
|
||||
*/
|
||||
|
||||
rtems_device_driver console_open(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void * arg
|
||||
)
|
||||
{
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Close entry point
|
||||
*/
|
||||
|
||||
rtems_device_driver console_close(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void * arg
|
||||
)
|
||||
{
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
/*
|
||||
* read bytes from the serial port. We only have stdin.
|
||||
*/
|
||||
|
||||
rtems_device_driver console_read(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void * arg
|
||||
)
|
||||
{
|
||||
rtems_libio_rw_args_t *rw_args;
|
||||
char *buffer;
|
||||
int maximum;
|
||||
int count = 0;
|
||||
|
||||
rw_args = (rtems_libio_rw_args_t *) arg;
|
||||
|
||||
buffer = rw_args->buffer;
|
||||
maximum = rw_args->count;
|
||||
|
||||
for (count = 0; count < maximum; count++) {
|
||||
buffer[ count ] = inbyte();
|
||||
if (buffer[ count ] == '\n' || buffer[ count ] == '\r') {
|
||||
buffer[ count++ ] = '\n';
|
||||
buffer[ count ] = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
rw_args->bytes_moved = count;
|
||||
return (count >= 0) ? RTEMS_SUCCESSFUL : RTEMS_UNSATISFIED;
|
||||
}
|
||||
|
||||
/*
|
||||
* write bytes to the serial port. Stdout and stderr are the same.
|
||||
*/
|
||||
|
||||
rtems_device_driver console_write(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void * arg
|
||||
)
|
||||
{
|
||||
int count;
|
||||
int maximum;
|
||||
rtems_libio_rw_args_t *rw_args;
|
||||
char *buffer;
|
||||
|
||||
rw_args = (rtems_libio_rw_args_t *) arg;
|
||||
|
||||
buffer = rw_args->buffer;
|
||||
maximum = rw_args->count;
|
||||
|
||||
for (count = 0; count < maximum; count++) {
|
||||
if ( buffer[ count ] == '\n') {
|
||||
outbyte('\r');
|
||||
}
|
||||
outbyte( buffer[ count ] );
|
||||
}
|
||||
|
||||
rw_args->bytes_moved = maximum;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* IO Control entry point
|
||||
*/
|
||||
|
||||
rtems_device_driver console_control(
|
||||
rtems_device_major_number major,
|
||||
rtems_device_minor_number minor,
|
||||
void * arg
|
||||
)
|
||||
{
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
@@ -1,189 +0,0 @@
|
||||
/* bsp.h
|
||||
*
|
||||
* This include file contains all MVME147 board IO definitions.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* MVME147 port for TNI - Telecom Bretagne
|
||||
* by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
* May 1996
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __MVME147_h
|
||||
#define __MVME147_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rtems.h>
|
||||
#include <clockdrv.h>
|
||||
#include <console.h>
|
||||
#include <iosupp.h>
|
||||
|
||||
/* Constants */
|
||||
|
||||
#define RAM_START 0x00005000
|
||||
#define RAM_END 0x00400000
|
||||
|
||||
/* MVME 147 Peripheral controller chip
|
||||
see MVME147/D1, 3.4 */
|
||||
|
||||
struct pcc_map {
|
||||
/* 32 bit registers */
|
||||
rtems_unsigned32 dma_table_address; /* 0xfffe1000 */
|
||||
rtems_unsigned32 dma_data_address; /* 0xfffe1004 */
|
||||
rtems_unsigned32 dma_bytecount; /* 0xfffe1008 */
|
||||
rtems_unsigned32 dma_data_holding; /* 0xfffe100c */
|
||||
|
||||
/* 16 bit registers */
|
||||
rtems_unsigned16 timer1_preload; /* 0xfffe1010 */
|
||||
rtems_unsigned16 timer1_count; /* 0xfffe1012 */
|
||||
rtems_unsigned16 timer2_preload; /* 0xfffe1014 */
|
||||
rtems_unsigned16 timer2_count; /* 0xfffe1016 */
|
||||
|
||||
/* 8 bit registers */
|
||||
rtems_unsigned8 timer1_int_control; /* 0xfffe1018 */
|
||||
rtems_unsigned8 timer1_control; /* 0xfffe1019 */
|
||||
rtems_unsigned8 timer2_int_control; /* 0xfffe101a */
|
||||
rtems_unsigned8 timer2_control; /* 0xfffe101b */
|
||||
|
||||
rtems_unsigned8 acfail_int_control; /* 0xfffe101c */
|
||||
rtems_unsigned8 watchdog_control; /* 0xfffe101d */
|
||||
|
||||
rtems_unsigned8 printer_int_control; /* 0xfffe101e */
|
||||
rtems_unsigned8 printer_control; /* 0xfffe102f */
|
||||
|
||||
rtems_unsigned8 dma_int_control; /* 0xfffe1020 */
|
||||
rtems_unsigned8 dma_control; /* 0xfffe1021 */
|
||||
rtems_unsigned8 bus_error_int_control; /* 0xfffe1022 */
|
||||
rtems_unsigned8 dma_status; /* 0xfffe1023 */
|
||||
rtems_unsigned8 abort_int_control; /* 0xfffe1024 */
|
||||
rtems_unsigned8 table_address_function_code; /* 0xfffe1025 */
|
||||
rtems_unsigned8 serial_port_int_control; /* 0xfffe1026 */
|
||||
rtems_unsigned8 general_purpose_control; /* 0xfffe1027 */
|
||||
rtems_unsigned8 lan_int_control; /* 0xfffe1028 */
|
||||
rtems_unsigned8 general_purpose_status; /* 0xfffe1029 */
|
||||
rtems_unsigned8 scsi_port_int_control; /* 0xfffe102a */
|
||||
rtems_unsigned8 slave_base_address; /* 0xfffe102b */
|
||||
rtems_unsigned8 software_int_1_control; /* 0xfffe102c */
|
||||
rtems_unsigned8 int_base_vector; /* 0xfffe102d */
|
||||
rtems_unsigned8 software_int_2_control; /* 0xfffe102e */
|
||||
rtems_unsigned8 revision_level; /* 0xfffe102f */
|
||||
};
|
||||
|
||||
#define pcc ((volatile struct pcc_map * const) 0xfffe1000)
|
||||
|
||||
#define z8530 0xfffe3001
|
||||
|
||||
|
||||
/* interrupt vectors - see MVME146/D1 4.14 */
|
||||
#define PCC_BASE_VECTOR 0x40 /* First user int */
|
||||
#define SCC_VECTOR PCC_BASE_VECTOR+3
|
||||
#define TIMER_1_VECTOR PCC_BASE_VECTOR+8
|
||||
#define TIMER_2_VECTOR PCC_BASE_VECTOR+9
|
||||
#define SOFT_1_VECTOR PCC_BASE_VECTOR+10
|
||||
#define SOFT_2_VECTOR PCC_BASE_VECTOR+11
|
||||
|
||||
#define USE_CHANNEL_A 1 /* 1 = use channel A for console */
|
||||
#define USE_CHANNEL_B 0 /* 1 = use channel B for console */
|
||||
|
||||
#if (USE_CHANNEL_A == 1)
|
||||
#define CONSOLE_CONTROL 0xfffe3002
|
||||
#define CONSOLE_DATA 0xfffe3003
|
||||
#elif (USE_CHANNEL_B == 1)
|
||||
#define CONSOLE_CONTROL 0xfffe3000
|
||||
#define CONSOLE_DATA 0xfffe3001
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define FOREVER 1 /* infinite loop */
|
||||
|
||||
#ifdef M147_INIT
|
||||
#undef EXTERN
|
||||
#define EXTERN
|
||||
#else
|
||||
#undef EXTERN
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Define the time limits for RTEMS Test Suite test durations.
|
||||
* Long test and short test duration limits are provided. These
|
||||
* values are in seconds and need to be converted to ticks for the
|
||||
* application.
|
||||
*
|
||||
*/
|
||||
|
||||
#define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */
|
||||
#define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */
|
||||
|
||||
/*
|
||||
* Define the interrupt mechanism for Time Test 27
|
||||
*
|
||||
* NOTE: Use the MPCSR vector for the MVME147
|
||||
*/
|
||||
|
||||
#define MUST_WAIT_FOR_INTERRUPT 0
|
||||
|
||||
#define Install_tm27_vector( handler ) set_vector( (handler), \
|
||||
SOFT_1_VECTOR, 1 )
|
||||
|
||||
#define Cause_tm27_intr() pcc->software_int_1_control = 0x0c
|
||||
/* generate level 4 sotware int. */
|
||||
|
||||
#define Clear_tm27_intr() pcc->software_int_1_control = 0x00
|
||||
|
||||
#define Lower_tm27_intr()
|
||||
|
||||
|
||||
/* miscellaneous stuff assumed to exist */
|
||||
|
||||
extern rtems_configuration_table BSP_Configuration;
|
||||
|
||||
extern m68k_isr_entry M68Kvec[]; /* vector table address */
|
||||
|
||||
/*
|
||||
* Device Driver Table Entries
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTE: Use the standard Console driver entry
|
||||
*/
|
||||
|
||||
/*
|
||||
* NOTE: Use the standard Clock driver entry
|
||||
*/
|
||||
|
||||
/*
|
||||
* How many libio files we want
|
||||
*/
|
||||
|
||||
#define BSP_LIBIO_MAX_FDS 20
|
||||
|
||||
/* functions */
|
||||
|
||||
void bsp_cleanup( void );
|
||||
|
||||
m68k_isr_entry set_vector(
|
||||
rtems_isr_entry handler,
|
||||
rtems_vector_number vector,
|
||||
int type
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
/* coverhd.h
|
||||
*
|
||||
* This include file has defines to represent the overhead associated
|
||||
* with calling a particular directive from C on this target.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __COVERHD_h
|
||||
#define __COVERHD_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define CALLING_OVERHEAD_INITIALIZE_EXECUTIVE 2
|
||||
#define CALLING_OVERHEAD_SHUTDOWN_EXECUTIVE 1
|
||||
#define CALLING_OVERHEAD_TASK_CREATE 3
|
||||
#define CALLING_OVERHEAD_TASK_IDENT 2
|
||||
#define CALLING_OVERHEAD_TASK_START 2
|
||||
#define CALLING_OVERHEAD_TASK_RESTART 2
|
||||
#define CALLING_OVERHEAD_TASK_DELETE 1
|
||||
#define CALLING_OVERHEAD_TASK_SUSPEND 1
|
||||
#define CALLING_OVERHEAD_TASK_RESUME 2
|
||||
#define CALLING_OVERHEAD_TASK_SET_PRIORITY 2
|
||||
#define CALLING_OVERHEAD_TASK_MODE 2
|
||||
#define CALLING_OVERHEAD_TASK_GET_NOTE 2
|
||||
#define CALLING_OVERHEAD_TASK_SET_NOTE 2
|
||||
#define CALLING_OVERHEAD_TASK_WAKE_WHEN 4
|
||||
#define CALLING_OVERHEAD_TASK_WAKE_AFTER 1
|
||||
#define CALLING_OVERHEAD_INTERRUPT_CATCH 2
|
||||
#define CALLING_OVERHEAD_CLOCK_GET 5
|
||||
#define CALLING_OVERHEAD_CLOCK_SET 4
|
||||
#define CALLING_OVERHEAD_CLOCK_TICK 1
|
||||
|
||||
#define CALLING_OVERHEAD_TIMER_CREATE 2
|
||||
#define CALLING_OVERHEAD_TIMER_IDENT 1
|
||||
#define CALLING_OVERHEAD_TIMER_DELETE 2
|
||||
#define CALLING_OVERHEAD_TIMER_FIRE_AFTER 2
|
||||
#define CALLING_OVERHEAD_TIMER_FIRE_WHEN 5
|
||||
#define CALLING_OVERHEAD_TIMER_RESET 1
|
||||
#define CALLING_OVERHEAD_TIMER_CANCEL 1
|
||||
#define CALLING_OVERHEAD_SEMAPHORE_CREATE 3
|
||||
#define CALLING_OVERHEAD_SEMAPHORE_DELETE 1
|
||||
#define CALLING_OVERHEAD_SEMAPHORE_IDENT 2
|
||||
#define CALLING_OVERHEAD_SEMAPHORE_OBTAIN 2
|
||||
#define CALLING_OVERHEAD_SEMAPHORE_RELEASE 1
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_CREATE 2
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_IDENT 2
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_DELETE 1
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_SEND 2
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT 2
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST 2
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE 3
|
||||
#define CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH 2
|
||||
|
||||
#define CALLING_OVERHEAD_EVENT_SEND 2
|
||||
#define CALLING_OVERHEAD_EVENT_RECEIVE 2
|
||||
#define CALLING_OVERHEAD_SIGNAL_CATCH 2
|
||||
#define CALLING_OVERHEAD_SIGNAL_SEND 2
|
||||
#define CALLING_OVERHEAD_PARTITION_CREATE 3
|
||||
#define CALLING_OVERHEAD_PARTITION_IDENT 2
|
||||
#define CALLING_OVERHEAD_PARTITION_DELETE 1
|
||||
#define CALLING_OVERHEAD_PARTITION_GET_BUFFER 2
|
||||
#define CALLING_OVERHEAD_PARTITION_RETURN_BUFFER 2
|
||||
#define CALLING_OVERHEAD_REGION_CREATE 3
|
||||
#define CALLING_OVERHEAD_REGION_IDENT 2
|
||||
#define CALLING_OVERHEAD_REGION_DELETE 2
|
||||
#define CALLING_OVERHEAD_REGION_GET_SEGMENT 3
|
||||
#define CALLING_OVERHEAD_REGION_RETURN_SEGMENT 2
|
||||
#define CALLING_OVERHEAD_PORT_CREATE 3
|
||||
#define CALLING_OVERHEAD_PORT_IDENT 2
|
||||
#define CALLING_OVERHEAD_PORT_DELETE 1
|
||||
#define CALLING_OVERHEAD_PORT_EXTERNAL_TO_INTERNAL 2
|
||||
#define CALLING_OVERHEAD_PORT_INTERNAL_TO_EXTERNAL 2
|
||||
|
||||
#define CALLING_OVERHEAD_IO_INITIALIZE 2
|
||||
#define CALLING_OVERHEAD_IO_OPEN 2
|
||||
#define CALLING_OVERHEAD_IO_CLOSE 3
|
||||
#define CALLING_OVERHEAD_IO_READ 2
|
||||
#define CALLING_OVERHEAD_IO_WRITE 2
|
||||
#define CALLING_OVERHEAD_IO_CONTROL 2
|
||||
#define CALLING_OVERHEAD_FATAL_ERROR_OCCURRED 1
|
||||
#define CALLING_OVERHEAD_RATE_MONOTONIC_CREATE 2
|
||||
#define CALLING_OVERHEAD_RATE_MONOTONIC_IDENT 2
|
||||
#define CALLING_OVERHEAD_RATE_MONOTONIC_DELETE 1
|
||||
#define CALLING_OVERHEAD_RATE_MONOTONIC_CANCEL 1
|
||||
#define CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD 2
|
||||
#define CALLING_OVERHEAD_MULTIPROCESSING_ANNOUNCE 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* end of include file */
|
||||
@@ -1,45 +0,0 @@
|
||||
/*
|
||||
* This routine returns control to 147Bug.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* MVME147 port for TNI - Telecom Bretagne
|
||||
* by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
* May 1996
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <rtems.h>
|
||||
#include <bsp.h>
|
||||
#include <clockdrv.h>
|
||||
|
||||
void bsp_return_to_monitor_trap()
|
||||
{
|
||||
extern void start( void );
|
||||
|
||||
register volatile void *start_addr;
|
||||
|
||||
m68k_set_vbr( 0 ); /* restore 147Bug vectors */
|
||||
asm volatile( "trap #15" ); /* trap to 147Bug */
|
||||
asm volatile( ".short 0x63" ); /* return to 147Bug (.RETURN) */
|
||||
/* restart program */
|
||||
start_addr = start;
|
||||
|
||||
asm volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) );
|
||||
}
|
||||
|
||||
void bsp_cleanup( void )
|
||||
{
|
||||
pcc->timer1_int_control = 0; /* Disable Timer 1 */
|
||||
pcc->timer2_int_control = 0; /* Disable Timer 2 */
|
||||
|
||||
M68Kvec[ 45 ] = bsp_return_to_monitor_trap; /* install handler */
|
||||
asm volatile( "trap #13" ); /* insures SUPV mode */
|
||||
}
|
||||
@@ -1,245 +0,0 @@
|
||||
/* bsp_start()
|
||||
*
|
||||
* This routine starts the application. It includes application,
|
||||
* board, and monitor specific initialization and configuration.
|
||||
* The generic CPU dependent initialization has been performed
|
||||
* before this routine is invoked.
|
||||
*
|
||||
* INPUT: NONE
|
||||
*
|
||||
* OUTPUT: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* MVME147 port for TNI - Telecom Bretagne
|
||||
* by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
* May 1996
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
|
||||
#include <libcsupport.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef STACK_CHECKER_ON
|
||||
#include <stackchk.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The original table from the application and our copy of it with
|
||||
* some changes.
|
||||
*/
|
||||
|
||||
extern rtems_configuration_table Configuration;
|
||||
rtems_configuration_table BSP_Configuration;
|
||||
|
||||
rtems_cpu_table Cpu_table;
|
||||
|
||||
char *rtems_progname;
|
||||
|
||||
/* Initialize whatever libc we are using
|
||||
* called from postdriver hook
|
||||
*/
|
||||
|
||||
void bsp_libc_init()
|
||||
{
|
||||
extern int end;
|
||||
rtems_unsigned32 heap_start;
|
||||
|
||||
heap_start = (rtems_unsigned32) &end;
|
||||
if (heap_start & (CPU_ALIGNMENT-1))
|
||||
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
|
||||
|
||||
RTEMS_Malloc_Initialize((void *) heap_start, 64 * 1024, 0);
|
||||
|
||||
/*
|
||||
* Init the RTEMS libio facility to provide UNIX-like system
|
||||
* calls for use by newlib (ie: provide __open, __close, etc)
|
||||
* Uses malloc() to get area for the iops, so must be after malloc init
|
||||
*/
|
||||
|
||||
rtems_libio_init();
|
||||
|
||||
/*
|
||||
* Set up for the libc handling.
|
||||
*/
|
||||
|
||||
if (BSP_Configuration.ticks_per_timeslice > 0)
|
||||
libc_init(1); /* reentrant if possible */
|
||||
else
|
||||
libc_init(0); /* non-reentrant */
|
||||
}
|
||||
|
||||
/*
|
||||
* Function: bsp_pretasking_hook
|
||||
* Created: 95/03/10
|
||||
*
|
||||
* Description:
|
||||
* BSP pretasking hook. Called just before drivers are initialized.
|
||||
* Used to setup libc and install any BSP extensions.
|
||||
*
|
||||
* NOTES:
|
||||
* Must not use libc (to do io) from here, since drivers are
|
||||
* not yet initialized.
|
||||
*
|
||||
*/
|
||||
|
||||
void
|
||||
bsp_pretasking_hook(void)
|
||||
{
|
||||
bsp_libc_init();
|
||||
|
||||
#ifdef STACK_CHECKER_ON
|
||||
/*
|
||||
* Initialize the stack bounds checker
|
||||
* We can either turn it on here or from the app.
|
||||
*/
|
||||
|
||||
Stack_check_Initialize();
|
||||
#endif
|
||||
|
||||
#ifdef RTEMS_DEBUG
|
||||
rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* After drivers are setup, register some "filenames"
|
||||
* and open stdin, stdout, stderr files
|
||||
*
|
||||
* Newlib will automatically associate the files with these
|
||||
* (it hardcodes the numbers)
|
||||
*/
|
||||
|
||||
void
|
||||
bsp_postdriver_hook(void)
|
||||
{
|
||||
int stdin_fd, stdout_fd, stderr_fd;
|
||||
int error_code;
|
||||
|
||||
error_code = 'S' << 24 | 'T' << 16;
|
||||
|
||||
if ((stdin_fd = __open("/dev/console", O_RDONLY, 0)) == -1)
|
||||
rtems_fatal_error_occurred( error_code | 'D' << 8 | '0' );
|
||||
|
||||
if ((stdout_fd = __open("/dev/console", O_WRONLY, 0)) == -1)
|
||||
rtems_fatal_error_occurred( error_code | 'D' << 8 | '1' );
|
||||
|
||||
if ((stderr_fd = __open("/dev/console", O_WRONLY, 0)) == -1)
|
||||
rtems_fatal_error_occurred( error_code | 'D' << 8 | '2' );
|
||||
|
||||
if ((stdin_fd != 0) || (stdout_fd != 1) || (stderr_fd != 2))
|
||||
rtems_fatal_error_occurred( error_code | 'I' << 8 | 'O' );
|
||||
}
|
||||
|
||||
|
||||
int main(
|
||||
int argc,
|
||||
char **argv,
|
||||
char **environp
|
||||
)
|
||||
{
|
||||
m68k_isr_entry *monitors_vector_table;
|
||||
int index;
|
||||
|
||||
if ((argc > 0) && argv && argv[0])
|
||||
rtems_progname = argv[0];
|
||||
else
|
||||
rtems_progname = "RTEMS";
|
||||
|
||||
monitors_vector_table = (m68k_isr_entry *)0; /* 135Bug Vectors are at 0 */
|
||||
m68k_set_vbr( monitors_vector_table );
|
||||
|
||||
for ( index=2 ; index<=255 ; index++ )
|
||||
M68Kvec[ index ] = monitors_vector_table[ 32 ];
|
||||
|
||||
M68Kvec[ 2 ] = monitors_vector_table[ 2 ]; /* bus error vector */
|
||||
M68Kvec[ 4 ] = monitors_vector_table[ 4 ]; /* breakpoints vector */
|
||||
M68Kvec[ 9 ] = monitors_vector_table[ 9 ]; /* trace vector */
|
||||
M68Kvec[ 47 ] = monitors_vector_table[ 47 ]; /* system call vector */
|
||||
|
||||
m68k_set_vbr( &M68Kvec );
|
||||
|
||||
pcc->int_base_vector = PCC_BASE_VECTOR; /* Set the PCC int vectors base */
|
||||
|
||||
(*(rtems_unsigned8 *)0xfffe2001) = 0x08;
|
||||
/* make VME access round-robin */
|
||||
|
||||
m68k_enable_caching();
|
||||
|
||||
/*
|
||||
* we only use a hook to get the C library initialized.
|
||||
*/
|
||||
|
||||
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
|
||||
|
||||
Cpu_table.predriver_hook = NULL;
|
||||
|
||||
Cpu_table.postdriver_hook = bsp_postdriver_hook;
|
||||
|
||||
Cpu_table.idle_task = NULL; /* do not override system IDLE task */
|
||||
|
||||
Cpu_table.do_zero_of_workspace = TRUE;
|
||||
|
||||
Cpu_table.interrupt_vector_table = (m68k_isr_entry *) &M68Kvec;
|
||||
|
||||
Cpu_table.interrupt_stack_size = 4096;
|
||||
|
||||
Cpu_table.extra_mpci_receive_server_stack = 0;
|
||||
|
||||
/*
|
||||
* Copy the table
|
||||
*/
|
||||
|
||||
BSP_Configuration = Configuration;
|
||||
|
||||
BSP_Configuration.work_space_start = (void *)
|
||||
(RAM_END - BSP_Configuration.work_space_size);
|
||||
|
||||
/*
|
||||
* Add 1 region for the RTEMS Malloc
|
||||
*/
|
||||
|
||||
BSP_Configuration.maximum_regions++;
|
||||
|
||||
/*
|
||||
* Add 1 extension for newlib libc
|
||||
*/
|
||||
|
||||
#ifdef RTEMS_NEWLIB
|
||||
BSP_Configuration.maximum_extensions++;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Add another extension if using the stack checker
|
||||
*/
|
||||
|
||||
#ifdef STACK_CHECKER_ON
|
||||
BSP_Configuration.maximum_extensions++;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Tell libio how many fd's we want and allow it to tweak config
|
||||
*/
|
||||
|
||||
rtems_libio_config(&BSP_Configuration, BSP_LIBIO_MAX_FDS);
|
||||
|
||||
rtems_initialize_executive( &BSP_Configuration, &Cpu_table );
|
||||
/* does not return */
|
||||
|
||||
bsp_cleanup();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* This file contains directives for the GNU linker which are specific
|
||||
* to the Motorola MVME147 boards.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* MVME147 port for TNI - Telecom Bretagne
|
||||
* by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
* May 1996
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
ram : org = 0x5000, l = 0x3fafff
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text 0x5000 :
|
||||
{
|
||||
text_start = . ;
|
||||
_text_start = . ;
|
||||
*(.text)
|
||||
etext = ALIGN( 0x10 ) ;
|
||||
_etext = .;
|
||||
}
|
||||
.data ADDR( .text ) + SIZEOF( .text ):
|
||||
{
|
||||
data_start = . ;
|
||||
_data_start = .;
|
||||
*(.data)
|
||||
edata = ALIGN( 0x10 ) ;
|
||||
_edata = .;
|
||||
}
|
||||
.bss ADDR( .data ) + SIZEOF( .data ):
|
||||
{
|
||||
bss_start = . ;
|
||||
_bss_start = . ;
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
end = . ;
|
||||
_end = . ;
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
/* Timer_init()
|
||||
*
|
||||
* This routine initializes the PCC timer on the MVME147 board.
|
||||
*
|
||||
* Input parameters: NONE
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* NOTE: It is important that the timer start/stop overhead be
|
||||
* determined when porting or modifying this code.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* MVME147 port for TNI - Telecom Bretagne
|
||||
* by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
* May 1996
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
|
||||
#define TIMER_INT_LEVEL 6
|
||||
|
||||
#define COUNTDOWN_VALUE 0
|
||||
/* Allows 0.4096 second delay betwin ints */
|
||||
/* Each tick is 6.25 us */
|
||||
|
||||
int Ttimer_val;
|
||||
rtems_boolean Timer_driver_Find_average_overhead;
|
||||
|
||||
rtems_isr timerisr();
|
||||
|
||||
void Timer_initialize()
|
||||
{
|
||||
(void) set_vector(timerisr, TIMER_1_VECTOR, 0); /* install ISR */
|
||||
|
||||
Ttimer_val = 0; /* clear timer ISR count */
|
||||
pcc->timer1_int_control = 0x00; /* Disable T1 Interr. */
|
||||
pcc->timer1_preload = COUNTDOWN_VALUE;
|
||||
/* write countdown preload value */
|
||||
pcc->timer1_control = 0x00; /* load preload value */
|
||||
pcc->timer1_control = 0x07; /* clear T1 overflow counter, enable counter */
|
||||
pcc->timer1_int_control = TIMER_INT_LEVEL|0x08;
|
||||
/* Enable Timer 1 and set its int. level */
|
||||
|
||||
}
|
||||
|
||||
#define AVG_OVERHEAD 0 /* No need to start/stop the timer to read
|
||||
its value on the MVME147 PCC: reads are not
|
||||
synchronized whith the counter updates*/
|
||||
#define LEAST_VALID 10 /* Don't trust a value lower than this */
|
||||
|
||||
int Read_timer()
|
||||
{
|
||||
rtems_unsigned32 total;
|
||||
rtems_unsigned16 counter_value;
|
||||
|
||||
counter_value = pcc->timer1_count; /* read the counter value */
|
||||
|
||||
total = ((Ttimer_val * 0x10000) + counter_value); /* in 6.25 us units */
|
||||
/* DC note : just look at the assembly generated
|
||||
to see gcc's impressive optimization ! */
|
||||
return total;
|
||||
|
||||
}
|
||||
|
||||
rtems_status_code Empty_function( void )
|
||||
{
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
void Set_find_average_overhead(
|
||||
rtems_boolean find_flag
|
||||
)
|
||||
{
|
||||
Timer_driver_Find_average_overhead = find_flag;
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
# timer_isr()
|
||||
#
|
||||
# This routine provides the ISR for the PCC timer on the MVME147
|
||||
# board. The timer is set up to generate an interrupt at maximum
|
||||
# intervals.
|
||||
#
|
||||
# MVME147 port for TNI - Telecom Bretagne
|
||||
# by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
# May 1996
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#include "asm.h"
|
||||
|
||||
BEGIN_CODE
|
||||
|
||||
.set T1_CONTROL_REGISTER, 0xfffe1018 | timer 1 control register
|
||||
|
||||
PUBLIC (timerisr)
|
||||
SYM (timerisr):
|
||||
orb #0x80, T1_CONTROL_REGISTER | clear T1 int status bit
|
||||
addql #1, SYM (Ttimer_val) | increment timer value
|
||||
end_timerisr:
|
||||
rte
|
||||
|
||||
END_CODE
|
||||
END
|
||||
@@ -1,194 +0,0 @@
|
||||
#
|
||||
# Timing Test Suite Results for the Motorola MVME147 BSP
|
||||
#
|
||||
# MVME147 port for TNI - Telecom Bretagne
|
||||
# by Dominique LE CAMPION (Dominique.LECAMPION@enst-bretagne.fr)
|
||||
# May 1996
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
Board: Motorola MVME147S
|
||||
CPU: Motorola MC68030 + MC68882 FPU
|
||||
Clock Speed: 20 Mhz
|
||||
Memory Configuration: DRAM w/no cache
|
||||
Wait States: ? wait state
|
||||
|
||||
Times Reported in: microseconds (6.25 us grain)
|
||||
Timer Source: MVME147 Peripheral Channel Controller tick timer
|
||||
|
||||
Column A: 3.5.1 pre-release
|
||||
|
||||
# DESCRIPTION A
|
||||
== ================================================================= ====
|
||||
1 rtems_semaphore_create 69
|
||||
rtems_semaphore_delete 69
|
||||
rtems_semaphore_obtain: available 44
|
||||
rtems_semaphore_obtain: not available -- NO_WAIT 44
|
||||
rtems_semaphore_release: no waiting tasks 56
|
||||
|
||||
2 rtems_semaphore_obtain: not available -- caller blocks 125
|
||||
|
||||
3 rtems_semaphore_release: task readied -- preempts caller 106
|
||||
|
||||
4 rtems_task_restart: blocked task -- preempts caller 181
|
||||
rtems_task_restart: ready task -- preempts caller 169
|
||||
rtems_semaphore_release: task readied -- returns to caller 81
|
||||
rtems_task_create 169
|
||||
rtems_task_start 87
|
||||
rtems_task_restart: suspended task -- returns to caller 106
|
||||
rtems_task_delete: suspended task 169
|
||||
rtems_task_restart: ready task -- returns to caller 112
|
||||
rtems_task_restart: blocked task -- returns to caller 150
|
||||
rtems_task_delete: blocked task 175
|
||||
|
||||
5 rtems_task_suspend: calling task 87
|
||||
rtems_task_resume: task readied -- preempts caller 75
|
||||
|
||||
6 rtems_task_restart: calling task 112
|
||||
rtems_task_suspend: returns to caller 56
|
||||
rtems_task_resume: task readied -- returns to caller 50
|
||||
rtems_task_delete: ready task 169
|
||||
|
||||
7 rtems_task_restart: suspended task -- preempts caller 143
|
||||
|
||||
8 rtems_task_set_priority: obtain current priority 37
|
||||
rtems_task_set_priority: returns to caller 75
|
||||
rtems_task_mode: obtain current mode 6
|
||||
rtems_task_mode: no reschedule 6
|
||||
rtems_task_mode: reschedule -- returns to caller 19
|
||||
rtems_task_mode: reschedule -- preempts caller 75
|
||||
rtems_task_set_note 37
|
||||
rtems_task_get_note 37
|
||||
rtems_clock_set 87
|
||||
rtems_clock_get 0
|
||||
|
||||
9 rtems_message_queue_create 225
|
||||
rtems_message_queue_send: no waiting tasks 112
|
||||
rtems_message_queue_urgent: no waiting tasks 112
|
||||
rtems_message_queue_receive: available 87
|
||||
rtems_message_queue_flush: no messages flushed 37
|
||||
rtems_message_queue_flush: messages flushed 50
|
||||
rtems_message_queue_delete 106
|
||||
|
||||
10 rtems_message_queue_receive: not available -- NO_WAIT 44
|
||||
rtems_message_queue_receive: not available -- caller blocks 125
|
||||
|
||||
11 rtems_message_queue_send: task readied -- preempts caller 144
|
||||
|
||||
12 rtems_message_queue_send: task readied -- returns to caller 119
|
||||
|
||||
13 rtems_message_queue_urgent: task readied -- preempts caller 144
|
||||
|
||||
14 rtems_message_queue_urgent: task readied -- returns to caller 119
|
||||
|
||||
15 rtems_event_receive: obtain current events 0
|
||||
rtems_event_receive: not available -- NO_WAIT 25
|
||||
rtems_event_receive: not available -- caller blocks 100
|
||||
rtems_event_send: no task readied 31
|
||||
rtems_event_receive: available 37
|
||||
rtems_event_send: task readied -- returns to caller 69
|
||||
|
||||
16 rtems_event_send: task readied -- preempts caller 100
|
||||
|
||||
17 rtems_task_set_priority: preempts caller 125
|
||||
|
||||
18 rtems_task_delete: calling task 200
|
||||
|
||||
19 rtems_signal_catch 19
|
||||
rtems_signal_send: returns to caller 50
|
||||
rtems_signal_send: signal to self 56
|
||||
exit ASR overhead: returns to calling task 44
|
||||
exit ASR overhead: returns to preempting task 75
|
||||
|
||||
20 rtems_partition_create 81
|
||||
rtems_region_create 75
|
||||
rtems_partition_get_buffer: available 44
|
||||
rtems_partition_get_buffer: not available 44
|
||||
rtems_partition_return_buffer 56
|
||||
rtems_partition_delete 62
|
||||
rtems_region_get_segment: available 56
|
||||
rtems_region_get_segment: not available -- NO_WAIT 56
|
||||
rtems_region_return_segment: no waiting tasks 69
|
||||
rtems_region_get_segment: not available -- caller blocks 144
|
||||
rtems_region_return_segment: task readied -- preempts caller 169
|
||||
rtems_region_return_segment: task readied -- returns to caller 137
|
||||
rtems_region_delete 56
|
||||
rtems_io_initialize 0
|
||||
rtems_io_open 0
|
||||
rtems_io_close 0
|
||||
rtems_io_read 0
|
||||
rtems_io_write 0
|
||||
rtems_io_control 0
|
||||
|
||||
21 rtems_task_ident 375
|
||||
rtems_message_queue_ident 362
|
||||
rtems_semaphore_ident 394
|
||||
rtems_partition_ident 362
|
||||
rtems_region_ident 369
|
||||
rtems_port_ident 362
|
||||
rtems_timer_ident 369
|
||||
rtems_rate_monotonic_ident 362
|
||||
|
||||
22 rtems_message_queue_broadcast: task readied -- returns to caller 131
|
||||
rtems_message_queue_broadcast: no waiting tasks 62
|
||||
rtems_message_queue_broadcast: task readied -- preempts caller 156
|
||||
|
||||
23 rtems_timer_create 31
|
||||
rtems_timer_fire_after: inactive 69
|
||||
rtems_timer_fire_after: active 69
|
||||
rtems_timer_cancel: active 44
|
||||
rtems_timer_cancel: inactive 37
|
||||
rtems_timer_reset: inactive 69
|
||||
rtems_timer_reset: active 69
|
||||
rtems_timer_fire_when: inactive 87
|
||||
rtems_timer_fire_when: active 87
|
||||
rtems_timer_delete: active 56
|
||||
rtems_timer_delete: inactive 50
|
||||
rtems_task_wake_when 125
|
||||
|
||||
24 rtems_task_wake_after: yield -- returns to caller 19
|
||||
rtems_task_wake_after: yields -- preempts caller 69
|
||||
|
||||
25 rtems_clock_tick 19
|
||||
|
||||
26 _ISR_Disable 6
|
||||
_ISR_Flash 6
|
||||
_ISR_Enable 6
|
||||
_Thread_Disable_dispatch 6
|
||||
_Thread_Enable_dispatch 25
|
||||
_Thread_Set_state 31
|
||||
_Thread_Disptach (NO FP) 62
|
||||
context switch: no floating point contexts 50
|
||||
context switch: self 12
|
||||
context switch: to another task 12
|
||||
context switch: restore 1st FP task 56
|
||||
fp context switch: save idle, restore idle 87
|
||||
fp context switch: save idle, restore initialized 75
|
||||
fp context switch: save initialized, restore initialized 75
|
||||
_Thread_Resume 25
|
||||
_Thread_Unblock 25
|
||||
_Thread_Ready 31
|
||||
_Thread_Get 12
|
||||
_Semaphore_Get 6
|
||||
_Thread_Get: invalid id 0
|
||||
|
||||
27 interrupt entry overhead: returns to interrupted task 12
|
||||
interrupt exit overhead: returns to interrupted task 12
|
||||
interrupt entry overhead: returns to nested interrupt 19
|
||||
interrupt exit overhead: returns to nested interrupt 6
|
||||
interrupt entry overhead: returns to preempting task 12
|
||||
interrupt exit overhead: returns to preempting task 81
|
||||
|
||||
28 rtems_port_create 37
|
||||
rtems_port_external_to_internal 31
|
||||
rtems_port_internal_to_external 31
|
||||
rtems_port_delete 56
|
||||
|
||||
29 rtems_rate_monotonic_create 44
|
||||
rtems_rate_monotonic_period: initiate period -- returns to caller 62
|
||||
rtems_rate_monotonic_period: obtain status 37
|
||||
rtems_rate_monotonic_cancel 56
|
||||
rtems_rate_monotonic_delete: inactive 62
|
||||
rtems_rate_monotonic_delete: active 69
|
||||
rtems_rate_monotonic_period: conclude periods -- caller blocks 87
|
||||
@@ -34,8 +34,6 @@ Shm_Print_statistics(void)
|
||||
(void) rtems_clock_get( RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticks_per_second );
|
||||
|
||||
seconds = ticks / ticks_per_second;
|
||||
if ( seconds == 0 )
|
||||
seconds = 1;
|
||||
|
||||
packets_per_second = Shm_Receive_message_count / seconds;
|
||||
if ( (Shm_Receive_message_count % seconds) >= (seconds / 2) )
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
#if defined(solaris2)
|
||||
#define O_NDELAY O_NONBLOCK
|
||||
#elif defined(RTEMS_NEWLIB)
|
||||
#elif defined(RTEMS_NEWLIB)
|
||||
#define O_NDELAY _FNBIO
|
||||
#endif
|
||||
|
||||
|
||||
@@ -252,9 +252,6 @@ void *realloc(
|
||||
}
|
||||
|
||||
new_area = malloc( size );
|
||||
|
||||
MSBUMP(malloc_calls, -1); /* subtract off the malloc */
|
||||
|
||||
if ( !new_area ) {
|
||||
free( ptr );
|
||||
return (void *) 0;
|
||||
|
||||
@@ -131,7 +131,7 @@ libc_start_hook(rtems_tcb *current_task,
|
||||
* real target.
|
||||
*/
|
||||
|
||||
#ifdef NEED_SETVBUF
|
||||
#ifdef RTEMS_UNIX
|
||||
rtems_extension
|
||||
libc_begin_hook(rtems_tcb *current_task)
|
||||
{
|
||||
@@ -274,7 +274,7 @@ libc_init(int reentrant)
|
||||
|
||||
libc_extension.thread_create = libc_create_hook;
|
||||
libc_extension.thread_start = libc_start_hook;
|
||||
#ifdef NEED_SETVBUF
|
||||
#ifdef RTEMS_UNIX
|
||||
libc_extension.thread_begin = libc_begin_hook;
|
||||
#endif
|
||||
libc_extension.thread_switch = libc_switch_hook;
|
||||
|
||||
@@ -17,24 +17,19 @@ NOTE: Other than the 'samples' directory these tests are intended
|
||||
which can be used either to test a board support package
|
||||
or as the starting point for a custom application.
|
||||
|
||||
mptests
|
||||
mptest
|
||||
|
||||
This directory contains the RTEMS Multiprocessor Test Suite.
|
||||
The tests in this directory provide near complete (98%+) test
|
||||
coverage of the multiprocessor specific code in RTEMS.
|
||||
|
||||
psxtests
|
||||
|
||||
This directory contains the RTEMS POSIX API Test Suite.
|
||||
The tests in this directory test the POSIX API support in RTEMS.
|
||||
|
||||
sptests
|
||||
sptest
|
||||
|
||||
This directory contains the RTEMS Single Processor Test Suite.
|
||||
The tests in this directory provide near complete (98%+) test
|
||||
coverage of the non-multiprocessor code in RTEMS.
|
||||
|
||||
tmtests
|
||||
tmtest
|
||||
|
||||
This directory contains the RTEMS Timing Test Suite.
|
||||
The tests in this directory are used to measure the execution
|
||||
|
||||
@@ -72,7 +72,7 @@ rtems_task Test_task(
|
||||
directive_failed( status, "rtems_timer_fire_after" );
|
||||
|
||||
while ( Stop_Test == FALSE ) {
|
||||
for ( count=DOT_COUNT ; count && (Stop_Test == FALSE) ; count-- ) {
|
||||
for ( count=DOT_COUNT ; count ; count-- ) {
|
||||
status = rtems_event_receive(
|
||||
RTEMS_EVENT_16,
|
||||
RTEMS_DEFAULT_OPTIONS,
|
||||
@@ -90,14 +90,6 @@ rtems_task Test_task(
|
||||
}
|
||||
put_dot('.');
|
||||
}
|
||||
|
||||
/*
|
||||
* Wait a bit before shutting down so we don't screw up the other node
|
||||
* when our MPCI shuts down
|
||||
*/
|
||||
|
||||
rtems_task_wake_after(10);
|
||||
|
||||
puts( "\n*** END OF TEST 7 ***" );
|
||||
exit( 0 );
|
||||
}
|
||||
|
||||
@@ -24,13 +24,6 @@ void Exit_test( void )
|
||||
rtems_status_code status;
|
||||
rtems_mode old_mode;
|
||||
|
||||
/*
|
||||
* Wait a bit before shutting down so we don't screw up the other node
|
||||
* when our MPCI shuts down
|
||||
*/
|
||||
|
||||
rtems_task_wake_after(20);
|
||||
|
||||
status = rtems_task_mode( RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &old_mode );
|
||||
directive_failed( status, "rtems_task_mode" );
|
||||
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
/* Init
|
||||
*
|
||||
* This routine is the initialization task for this test program.
|
||||
* It is a user initialization task and has the responsibility for creating
|
||||
* and starting the tasks that make up the test. If the time of day
|
||||
* clock is required for the test, it should also be set to a known
|
||||
* value by this function.
|
||||
*
|
||||
* Input parameters:
|
||||
* argument - task argument
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#define TEST_INIT
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_time_of_day time;
|
||||
rtems_status_code status;
|
||||
|
||||
puts( "\n\n*** TEST 1 ***" );
|
||||
|
||||
build_time( &time, 12, 31, 1988, 9, 0, 0, 0 );
|
||||
status = rtems_clock_set( &time );
|
||||
directive_failed( status, "rtems_clock_set" );
|
||||
|
||||
Task_name[ 1 ] = rtems_build_name( 'T', 'A', '1', ' ' );
|
||||
Task_name[ 2 ] = rtems_build_name( 'T', 'A', '2', ' ' );
|
||||
Task_name[ 3 ] = rtems_build_name( 'T', 'A', '3', ' ' );
|
||||
|
||||
status = rtems_task_create(
|
||||
Task_name[ 1 ],
|
||||
1,
|
||||
RTEMS_MINIMUM_STACK_SIZE,
|
||||
RTEMS_INTERRUPT_LEVEL(31),
|
||||
RTEMS_DEFAULT_ATTRIBUTES,
|
||||
&Task_id[ 1 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create of TA1" );
|
||||
|
||||
status = rtems_task_create(
|
||||
Task_name[ 2 ],
|
||||
1,
|
||||
RTEMS_MINIMUM_STACK_SIZE * 2,
|
||||
RTEMS_DEFAULT_MODES,
|
||||
RTEMS_DEFAULT_ATTRIBUTES,
|
||||
&Task_id[ 2 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create of TA2" );
|
||||
|
||||
status = rtems_task_create(
|
||||
Task_name[ 3 ],
|
||||
1,
|
||||
RTEMS_MINIMUM_STACK_SIZE * 3,
|
||||
RTEMS_DEFAULT_MODES,
|
||||
RTEMS_DEFAULT_ATTRIBUTES,
|
||||
&Task_id[ 3 ]
|
||||
);
|
||||
directive_failed( status, "rtems_task_create of TA3" );
|
||||
|
||||
status = rtems_task_start( Task_id[ 1 ], Task_1_through_3, 0 );
|
||||
directive_failed( status, "rtems_task_start of TA1" );
|
||||
|
||||
status = rtems_task_start( Task_id[ 2 ], Task_1_through_3, 0 );
|
||||
directive_failed( status, "rtems_task_start of TA2" );
|
||||
|
||||
status = rtems_task_start( Task_id[ 3 ], Task_1_through_3, 0 );
|
||||
directive_failed( status, "rtems_task_start of TA3" );
|
||||
|
||||
status = rtems_task_delete( RTEMS_SELF );
|
||||
directive_failed( status, "rtems_task_delete of RTEMS_SELF" );
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
/* system.h
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <tmacros.h>
|
||||
|
||||
/* functions */
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
|
||||
rtems_task Task_1_through_3(
|
||||
rtems_task_argument argument
|
||||
);
|
||||
|
||||
/* configuration information */
|
||||
|
||||
#define CONFIGURE_SPTEST
|
||||
|
||||
#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
|
||||
#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
|
||||
|
||||
#include <confdefs.h>
|
||||
|
||||
/* global variables */
|
||||
|
||||
TEST_EXTERN rtems_id Task_id[ 4 ]; /* array of task ids */
|
||||
TEST_EXTERN rtems_name Task_name[ 4 ]; /* array of task names */
|
||||
|
||||
/* end of include file */
|
||||
@@ -1,50 +0,0 @@
|
||||
/* Task_1_through_3
|
||||
*
|
||||
* This routine serves as a test task. It verifies the basic task
|
||||
* switching capabilities of the executive.
|
||||
*
|
||||
* Input parameters:
|
||||
* argument - task argument
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "system.h"
|
||||
|
||||
rtems_task Task_1_through_3(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
{
|
||||
rtems_id tid;
|
||||
rtems_time_of_day time;
|
||||
rtems_status_code status;
|
||||
|
||||
status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid );
|
||||
directive_failed( status, "rtems_task_ident" );
|
||||
|
||||
while( FOREVER ) {
|
||||
status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time );
|
||||
directive_failed( status, "rtems_clock_get" );
|
||||
|
||||
if ( time.second >= 35 ) {
|
||||
puts( "*** END OF TEST 1 ***" );
|
||||
exit( 0 );
|
||||
}
|
||||
|
||||
put_name( Task_name[ task_number( tid ) ], FALSE );
|
||||
print_time( " - rtems_clock_get - ", &time, "\n" );
|
||||
|
||||
status = rtems_task_wake_after( task_number( tid ) * 5 * TICKS_PER_SECOND );
|
||||
directive_failed( status, "rtems_task_wake_after" );
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifndef _POSIX_TIMERS
|
||||
#error "rtems is supposed to have clock_gettime"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
clockid_t clock_id = 0;
|
||||
struct timespec tp;
|
||||
int result;
|
||||
|
||||
result = clock_gettime( clock_id, &tp );
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifndef _POSIX_TIMERS
|
||||
#error "rtems is supposed to have clock_settime"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
clockid_t clock_id = 0;
|
||||
struct timespec tp;
|
||||
int result;
|
||||
|
||||
result = clock_settime( clock_id, &tp );
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifndef _POSIX_TIMERS
|
||||
#error "rtems is supposed to have clock_getres"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
clockid_t clock_id = 0;
|
||||
struct timespec res;
|
||||
int result;
|
||||
|
||||
result = clock_getres( clock_id, &res );
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifndef _POSIX_CPUTIME
|
||||
#error "rtems is supposed to have clock_getcpuclockid"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pid_t pid = 0;
|
||||
clockid_t clock_id;
|
||||
int result;
|
||||
|
||||
result = clock_getcpuclockid( pid, &clock_id );
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifndef _POSIX_CPUTIME
|
||||
#error "rtems is supposed to have clock_setenable_attr"
|
||||
#endif
|
||||
#ifndef _POSIX_THREAD_CPUTIME
|
||||
#error "rtems is supposed to have clock_setenable_attr"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
clockid_t clock_id = 0;
|
||||
int attr;
|
||||
int result;
|
||||
|
||||
attr = CLOCK_ENABLED;
|
||||
attr = CLOCK_DISABLED;
|
||||
|
||||
result = clock_setenable_attr( clock_id, attr );
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifndef _POSIX_CPUTIME
|
||||
#error "rtems is supposed to have clock_getenable_attr"
|
||||
#endif
|
||||
#ifndef _POSIX_THREAD_CPUTIME
|
||||
#error "rtems is supposed to have clock_getenable_attr"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
clockid_t clock_id = 0;
|
||||
int attr;
|
||||
int result;
|
||||
|
||||
result = clock_getenable_attr( clock_id, &attr );
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_condattr_init"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_condattr_t attribute;
|
||||
int result;
|
||||
|
||||
result = pthread_condattr_init( &attribute );
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_condattr_destroy"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_condattr_t attribute;
|
||||
int result;
|
||||
|
||||
result = pthread_condattr_destroy( &attribute );
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_cond_init"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||
pthread_condattr_t attribute;
|
||||
int result;
|
||||
|
||||
result = pthread_cond_init( &cond, &attribute );
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_cond_destroy"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||
int result;
|
||||
|
||||
result = pthread_cond_destroy( &cond );
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_cond_signal"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||
int result;
|
||||
|
||||
result = pthread_cond_signal( &cond );
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_cond_wait"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
int result;
|
||||
|
||||
result = pthread_cond_wait( &cond, &mutex );
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_cond_timedwait"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
struct timespec abstime;
|
||||
int result;
|
||||
|
||||
result = pthread_cond_timedwait( &cond, &mutex, &abstime );
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_condattr_getpshared"
|
||||
#endif
|
||||
#ifndef _POSIX_THREAD_PROCESS_SHARED
|
||||
#error "rtems is supposed to have pthread_condattr_setpshared"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_condattr_t attribute;
|
||||
int pshared;
|
||||
int result;
|
||||
|
||||
result = pthread_condattr_getpshared( &attribute, &pshared );
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_condattr_setpshared"
|
||||
#endif
|
||||
#ifndef _POSIX_THREAD_PROCESS_SHARED
|
||||
#error "rtems is supposed to have pthread_condattr_setpshared"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_condattr_t attribute;
|
||||
int pshared;
|
||||
int result;
|
||||
|
||||
pshared = PTHREAD_PROCESS_SHARED;
|
||||
pshared = PTHREAD_PROCESS_PRIVATE;
|
||||
|
||||
result = pthread_condattr_setpshared( &attribute, pshared );
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_cond_broadcast"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||
int result;
|
||||
|
||||
result = pthread_cond_broadcast( &cond );
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_key_create"
|
||||
#endif
|
||||
|
||||
void key_destructor(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_key_t key;
|
||||
int result;
|
||||
|
||||
result = pthread_key_create( &key, key_destructor );
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_setspecific"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_key_t key;
|
||||
int value;
|
||||
int result;
|
||||
|
||||
key = 0;
|
||||
value = 0;
|
||||
|
||||
result = pthread_setspecific( key, &value );
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_getspecific"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_key_t key;
|
||||
void *value;
|
||||
|
||||
key = 0;
|
||||
|
||||
value = pthread_getspecific( key );
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_key_delete"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_key_t key = 0;
|
||||
int result;
|
||||
|
||||
result = pthread_key_delete( key );
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_mutexattr_init"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_mutexattr_t attribute;
|
||||
int result;
|
||||
|
||||
result = pthread_mutexattr_init( &attribute );
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_mutexattr_destroy"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_mutexattr_t attribute;
|
||||
int result;
|
||||
|
||||
result = pthread_mutexattr_destroy( &attribute );
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_mutex_init"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
pthread_mutexattr_t attribute;
|
||||
int result;
|
||||
|
||||
result = pthread_mutex_init( &mutex, &attribute );
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_mutex_destroy"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
int result;
|
||||
|
||||
result = pthread_mutex_destroy( &mutex );
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_mutex_lock"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
int result;
|
||||
|
||||
result = pthread_mutex_lock( &mutex );
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_mutex_unlock"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
int result;
|
||||
|
||||
result = pthread_mutex_unlock( &mutex );
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIO_INHERIT
|
||||
#error "rtems is supposed to have pthread_mutexattr_setprotocol"
|
||||
#endif
|
||||
#ifndef _POSIX_THREAD_PRIO_PROTECT
|
||||
#error "rtems is supposed to have pthread_mutexattr_setprotocol"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_mutexattr_t attribute;
|
||||
int protocol;
|
||||
int result;
|
||||
|
||||
protocol = PTHREAD_PRIO_NONE;
|
||||
protocol = PTHREAD_PRIO_INHERIT;
|
||||
protocol = PTHREAD_PRIO_PROTECT;
|
||||
|
||||
result = pthread_mutexattr_setprotocol( &attribute, protocol );
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIO_INHERIT
|
||||
#error "rtems is supposed to have pthread_mutexattr_getprioceiling"
|
||||
#endif
|
||||
#ifndef _POSIX_THREAD_PRIO_PROTECT
|
||||
#error "rtems is supposed to have pthread_mutexattr_getprioceiling"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_mutexattr_t attribute;
|
||||
int prioceiling = 0;
|
||||
int result;
|
||||
|
||||
result = pthread_mutexattr_getprioceiling( &attribute, &prioceiling );
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIO_INHERIT
|
||||
#error "rtems is supposed to have pthread_mutexattr_setprioceiling"
|
||||
#endif
|
||||
#ifndef _POSIX_THREAD_PRIO_PROTECT
|
||||
#error "rtems is supposed to have pthread_mutexattr_setprioceiling"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_mutexattr_t attribute;
|
||||
int prioceiling = 0;
|
||||
int result;
|
||||
|
||||
result = pthread_mutexattr_setprioceiling( &attribute, prioceiling );
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_mutexattr_getpshared"
|
||||
#endif
|
||||
#ifndef _POSIX_THREAD_PROCESS_SHARED
|
||||
#error "rtems is supposed to have pthread_mutexattr_setpshared"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_mutexattr_t attribute;
|
||||
int pshared;
|
||||
int result;
|
||||
|
||||
result = pthread_mutexattr_getpshared( &attribute, &pshared );
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_mutexattr_setpshared"
|
||||
#endif
|
||||
#ifndef _POSIX_THREAD_PROCESS_SHARED
|
||||
#error "rtems is supposed to have pthread_mutexattr_setpshared"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_mutexattr_t attribute;
|
||||
int pshared;
|
||||
int result;
|
||||
|
||||
pshared = PTHREAD_PROCESS_SHARED;
|
||||
pshared = PTHREAD_PROCESS_PRIVATE;
|
||||
|
||||
result = pthread_mutexattr_setpshared( &attribute, pshared );
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_mutex_trylock"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
int result;
|
||||
|
||||
result = pthread_mutex_trylock( &mutex );
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_mutex_timedlock"
|
||||
#endif
|
||||
#ifndef _POSIX_TIMEOUTS
|
||||
#error "rtems is supposed to have pthread_mutex_timedlock"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
struct timespec timeout;
|
||||
int result;
|
||||
|
||||
result = pthread_mutex_timedlock( &mutex, &timeout );
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIO_INHERIT
|
||||
#error "rtems is supposed to have pthread_mutexattr_getprotocol"
|
||||
#endif
|
||||
#ifndef _POSIX_THREAD_PRIO_PROTECT
|
||||
#error "rtems is supposed to have pthread_mutexattr_getprotocol"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_mutexattr_t attribute;
|
||||
int protocol;
|
||||
int result;
|
||||
|
||||
result = pthread_mutexattr_getprotocol( &attribute, &protocol );
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIO_INHERIT
|
||||
#error "rtems is supposed to have pthread_mutex_getprioceiling"
|
||||
#endif
|
||||
#ifndef _POSIX_THREAD_PRIO_PROTECT
|
||||
#error "rtems is supposed to have pthread_mutex_getprioceiling"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_mutex_t mutex;
|
||||
int prioceiling;
|
||||
int result;
|
||||
|
||||
result = pthread_mutex_getprioceiling( &mutex, &prioceiling );
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIO_INHERIT
|
||||
#error "rtems is supposed to have pthread_mutex_setprioceiling"
|
||||
#endif
|
||||
#ifndef _POSIX_THREAD_PRIO_PROTECT
|
||||
#error "rtems is supposed to have pthread_mutex_setprioceiling"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_mutex_t mutex;
|
||||
int prioceiling;
|
||||
int oldceiling;
|
||||
int result;
|
||||
|
||||
prioceiling = 0;
|
||||
|
||||
result = pthread_mutex_setprioceiling( &mutex, prioceiling, &oldceiling );
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_attr_init"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_init( &attribute );
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_attr_destroy"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_destroy( &attribute );
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_attr_setdetachstate"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
int state;
|
||||
int result;
|
||||
|
||||
state = PTHREAD_CREATE_DETACHED;
|
||||
state = PTHREAD_CREATE_JOINABLE;
|
||||
|
||||
result = pthread_attr_setdetachstate( &attribute, state );
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_attr_getdetachstate"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
int state;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getdetachstate( &attribute, &state );
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
#include <limits.h> /* only for PTHREAD_STACK_MIN */
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_setstacksize"
|
||||
#endif
|
||||
|
||||
#ifndef _POSIX_THREAD_ATTR_STACKSIZE
|
||||
#error "rtems is supposed to have pthread_setstacksize"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
size_t size;
|
||||
int result;
|
||||
|
||||
size = PTHREAD_STACK_MIN;
|
||||
|
||||
result = pthread_attr_setstacksize( &attribute, size );
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_getstacksize"
|
||||
#endif
|
||||
|
||||
#ifndef _POSIX_THREAD_ATTR_STACKSIZE
|
||||
#error "rtems is supposed to have pthread_getstacksize"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
size_t size;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getstacksize( &attribute, &size );
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_create"
|
||||
#endif
|
||||
|
||||
void *test_task(
|
||||
void * arg
|
||||
)
|
||||
{
|
||||
for ( ; ; )
|
||||
;
|
||||
}
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_t thread;
|
||||
pthread_attr_t attribute;
|
||||
void *arg = NULL;
|
||||
int result;
|
||||
|
||||
result = pthread_create( &thread, &attribute, test_task, arg );
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_exit"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
void *status = NULL;
|
||||
|
||||
pthread_exit( status );
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_self"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_t self;
|
||||
|
||||
self = pthread_self();
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_equal"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_t id_1 = 0;
|
||||
pthread_t id_2 = 0;
|
||||
int result;
|
||||
|
||||
result = pthread_equal( id_1, id_2 );
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
|
||||
#error "RTEMS is support to have pthread_setschedparam"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_t thread;
|
||||
int policy;
|
||||
struct sched_param param;
|
||||
int result;
|
||||
|
||||
thread = 0;
|
||||
|
||||
policy = SCHED_OTHER;
|
||||
policy = SCHED_FIFO;
|
||||
policy = SCHED_RR;
|
||||
#ifdef _POSIX_SPORADIC_SERVER
|
||||
policy = SCHED_SPORADIC;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* really should use sched_get_priority_min() and sched_get_priority_max()
|
||||
*/
|
||||
|
||||
param.sched_priority = 0;
|
||||
#ifdef _POSIX_SPORADIC_SERVER
|
||||
param.ss_low_priority = 0;
|
||||
param.ss_replenish_period.tv_sec = 0;
|
||||
param.ss_replenish_period.tv_nsec = 0;
|
||||
param.ss_initial_budget.tv_sec = 0;
|
||||
param.ss_initial_budget.tv_nsec = 0;
|
||||
#endif
|
||||
|
||||
result = pthread_setschedparam( thread, policy, ¶m );
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
|
||||
#error "RTEMS is support to have pthread_getschedparam"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_t thread;
|
||||
int policy;
|
||||
struct sched_param param;
|
||||
int result;
|
||||
|
||||
thread = 0;
|
||||
|
||||
result = pthread_getschedparam( thread, &policy, ¶m );
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
|
||||
#error "RTEMS is support to have pthread_attr_setscope"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int contentionscope;
|
||||
int result;
|
||||
|
||||
contentionscope = PTHREAD_SCOPE_SYSTEM;
|
||||
contentionscope = PTHREAD_SCOPE_PROCESS;
|
||||
|
||||
result = pthread_attr_setscope( &attr, contentionscope );
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
|
||||
#error "RTEMS is support to have pthread_attr_getscope"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int contentionscope;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getscope( &attr, &contentionscope );
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
|
||||
#error "RTEMS is support to have pthread_attr_setinheritsched"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int inheritsched;
|
||||
int result;
|
||||
|
||||
inheritsched = PTHREAD_INHERIT_SCHED;
|
||||
inheritsched = PTHREAD_EXPLICIT_SCHED;
|
||||
|
||||
result = pthread_attr_setinheritsched( &attr, inheritsched );
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
|
||||
#error "RTEMS is support to have pthread_attr_getinheritsched"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int inheritsched;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getinheritsched( &attr, &inheritsched );
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
|
||||
#error "RTEMS is support to have pthread_attr_setschedpolicy"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int policy;
|
||||
int result;
|
||||
|
||||
policy = SCHED_FIFO;
|
||||
policy = SCHED_RR;
|
||||
policy = SCHED_OTHER;
|
||||
#ifdef _POSIX_SPORADIC_SERVER
|
||||
policy = SCHED_SPORADIC;
|
||||
#endif
|
||||
|
||||
result = pthread_attr_setschedpolicy( &attr, policy );
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
|
||||
#error "RTEMS is support to have pthread_attr_getschedpolicy"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int policy;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getschedpolicy( &attr, &policy );
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
|
||||
#error "RTEMS is support to have pthread_attr_setschedparam"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
struct sched_param param;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_setschedparam( &attr, ¶m );
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
|
||||
#error "RTEMS is support to have pthread_attr_getschedparam"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
struct sched_param param;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getschedparam( &attr, ¶m );
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_detach"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_t thread;
|
||||
int result;
|
||||
|
||||
thread = 0;
|
||||
result = pthread_detach( thread );
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
|
||||
#error "RTEMS is support to have pthread_setschedparam"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_t thread = 0;
|
||||
int policy;
|
||||
struct sched_param param;
|
||||
int result;
|
||||
|
||||
policy = SCHED_OTHER;
|
||||
policy = SCHED_FIFO;
|
||||
policy = SCHED_RR;
|
||||
#ifdef _POSIX_SPORADIC_SERVER
|
||||
policy = SCHED_SPORADIC;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* really should use sched_get_priority_min() and sched_get_priority_max()
|
||||
*/
|
||||
|
||||
param.sched_priority = 0;
|
||||
#ifdef _POSIX_SPORADIC_SERVER
|
||||
param.ss_low_priority = 0;
|
||||
param.ss_replenish_period.tv_sec = 0;
|
||||
param.ss_replenish_period.tv_nsec = 0;
|
||||
param.ss_initial_budget.tv_sec = 0;
|
||||
param.ss_initial_budget.tv_nsec = 0;
|
||||
#endif
|
||||
|
||||
result = pthread_setschedparam( thread, policy, ¶m );
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_PRIORITY_SCHEDULING
|
||||
#error "RTEMS is support to have pthread_getschedparam"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_t thread = 0;
|
||||
int policy;
|
||||
struct sched_param param;
|
||||
int result;
|
||||
|
||||
result = pthread_getschedparam( thread, &policy, ¶m );
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
#include <limits.h> /* only for PTHREAD_STACK_MIN */
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_setstackaddr"
|
||||
#endif
|
||||
|
||||
#ifndef _POSIX_THREAD_ATTR_STACKADDR
|
||||
#error "rtems is supposed to have pthread_setstackaddr"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
void *stackaddr;
|
||||
int result;
|
||||
|
||||
stackaddr = NULL;
|
||||
|
||||
result = pthread_attr_setstackaddr( &attribute, stackaddr );
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
#include <limits.h> /* only for PTHREAD_STACK_MIN */
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_getstackaddr"
|
||||
#endif
|
||||
|
||||
#ifndef _POSIX_THREAD_ATTR_STACKADDR
|
||||
#error "rtems is supposed to have pthread_getstackaddr"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
void *stackaddr;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getstackaddr( &attribute, &stackaddr );
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_join"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_t thread;
|
||||
void *value_ptr;
|
||||
int result;
|
||||
|
||||
thread = 0;
|
||||
|
||||
result = pthread_join( thread, &value_ptr );
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_once"
|
||||
#endif
|
||||
|
||||
void init_routine( void )
|
||||
{
|
||||
}
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_once_t once_control = PTHREAD_ONCE_INIT;
|
||||
int result;
|
||||
|
||||
result = pthread_once( &once_control, init_routine );
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_cancel"
|
||||
#endif
|
||||
|
||||
void init_routine( void )
|
||||
{
|
||||
}
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_t thread;
|
||||
int result;
|
||||
|
||||
thread = 0;
|
||||
result = pthread_cancel( thread );
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_setcancelstate"
|
||||
#endif
|
||||
|
||||
void init_routine( void )
|
||||
{
|
||||
}
|
||||
|
||||
void test( void )
|
||||
{
|
||||
int state;
|
||||
int oldstate;
|
||||
int result;
|
||||
|
||||
state = PTHREAD_CANCEL_ENABLE;
|
||||
state = PTHREAD_CANCEL_DISABLE;
|
||||
|
||||
result = pthread_setcancelstate( state, &oldstate );
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_setcanceltype"
|
||||
#endif
|
||||
|
||||
void init_routine( void )
|
||||
{
|
||||
}
|
||||
|
||||
void test( void )
|
||||
{
|
||||
int type;
|
||||
int oldtype;
|
||||
int result;
|
||||
|
||||
type = PTHREAD_CANCEL_DEFERRED;
|
||||
type = PTHREAD_CANCEL_ASYNCHRONOUS;
|
||||
|
||||
result = pthread_setcanceltype( type, &oldtype );
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_testcancel"
|
||||
#endif
|
||||
|
||||
void init_routine( void )
|
||||
{
|
||||
}
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_testcancel();
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_cleanup_push"
|
||||
#endif
|
||||
|
||||
void cleanup_routine(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
void test( void )
|
||||
{
|
||||
int argument;
|
||||
|
||||
argument = 0;
|
||||
|
||||
pthread_cleanup_push( cleanup_routine, &argument );
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREADS
|
||||
#error "rtems is supposed to have pthread_cleanup_pop"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_cleanup_pop( 1 );
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_CPUTIME
|
||||
#error "rtems is supposed to have pthread_getcpuclockid"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_t thread;
|
||||
clockid_t clock_id;
|
||||
int result;
|
||||
|
||||
thread = 0;
|
||||
|
||||
result = pthread_getcpuclockid( thread, &clock_id );
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* This test file is used to verify that the header files associated with
|
||||
* the callout are correct.
|
||||
*
|
||||
* COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
* All rights assigned to U.S. Government, 1994.
|
||||
*
|
||||
* This material may be reproduced by or for the U.S. Government pursuant
|
||||
* to the copyright license under the clause at DFARS 252.227-7013. This
|
||||
* notice must appear in all copies of this file and its derivatives.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#ifndef _POSIX_THREAD_CPUTIME
|
||||
#error "rtems is supposed to have pthread_attr_setcputime"
|
||||
#endif
|
||||
|
||||
void test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int clock_allowed;
|
||||
int result;
|
||||
|
||||
clock_allowed = CLOCK_ALLOWED;
|
||||
clock_allowed = CLOCK_DISALLOWED;
|
||||
|
||||
result = pthread_attr_setcputime( &attr, clock_allowed );
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user