* irq/irq_init.c, include/bsp.h:
define BSP_PPC403_CLOCK_HOOK_EXCEPTION
so that we hook the timer exception rather than going
through the interrupt dispatcher.
* ppc403/clock/clock.c: Added (conditionally compiled)
code so that a BSP can choose to hook the timer exception
directly rather than going through the interrupt dispatcher.
* startup/bspstart.c: Removed SPRG0 warning - this BSP
is OK.
Use interrupt stack limits from linker script.
No need to reserve space beyond '_end'. linkcmds now
reserves space below '_end'.
Use low-level exception handling support from
new-exceptions/bspsupport.
* dlentry/dlentry.S: load R13 with _SDA_BASE_ so that
SVR4-ABI access of short data area works. No support
for R2/sdata2/eabi, so far but that would be easy
(atm R2 is loaded with got address IIRC).
* startup/linkcmds: fixed sdata/sbss areas -- these
must be contiguous for SVR4 complicant access via R13.
Use kludged layout so that sbss, bss, sbss2 are all
contiguous and zeroed by dlentry.S.
Provide _SDA_BASE_ and _SDA2_BASE_ for loading R13 (and
R2 if anyone wants to use EABI).
Make sure interrupt stack is never in heap area by
moving it below '_end'.
Provide symbols for start + end of interrupt stack.
PR 1291/cpukit
* psx05/init.c, psxmsgq01/init.c: As part of addressing timeouts and
POSIX services taking relative instead of absolute time for timeouts,
these tests were updated.
PR 1291/cpukit
* itron/inline/rtems/itron/semaphore.inl, itron/src/twai_sem.c,
posix/include/mqueue.h, posix/include/rtems/posix/mqueue.h,
posix/include/rtems/posix/semaphore.h,
posix/include/rtems/posix/time.h, posix/src/condtimedwait.c,
posix/src/mqueuereceive.c, posix/src/mqueuerecvsupp.c,
posix/src/mqueuesend.c, posix/src/mqueuesendsupp.c,
posix/src/mqueuetimedreceive.c, posix/src/mqueuetimedsend.c,
posix/src/mutextimedlock.c, posix/src/mutextranslatereturncode.c,
posix/src/posixtimespecabsolutetimeout.c,
posix/src/prwlocktimedrdlock.c, posix/src/prwlocktimedwrlock.c,
posix/src/semaphoretranslatereturncode.c,
posix/src/semaphorewaitsupp.c, posix/src/semtimedwait.c,
posix/src/semtrywait.c, posix/src/semwait.c,
posix/src/sigtimedwait.c, posix/src/timersettime.c,
posix/src/ualarm.c, rtems/src/semobtain.c,
rtems/src/semtranslatereturncode.c,
score/include/rtems/score/coremutex.h,
score/include/rtems/score/coresem.h, score/src/coresemseize.c: This
patch addresses issues on implementation of the timeout on the
following POSIX services. Some of these services incorrectly took a
timeout as a relative time. Others would compute a 0 delta to timeout
if the absolute time and the current time were equal and thus
incorrectly block the caller forever. The root of the confusion is
that POSIX specifies that if the timeout is incorrect (e.g. in the
past, is now, or is numerically invalid), that it does not matter if
the call would succeed without blocking. This is in contrast to RTEMS
programming style where all errors are checked before any critical
sections are entered. This fix implemented a more uniform way of
handling POSIX absolute time timeouts.
+ pthread_cond_timedwait - could block forever
+ mq_timedreceive - used relative not absolute time
+ mq_timedsend - used relative not absolute time
+ pthread_mutex_timedlock - used relative not absolute time
+ pthread_rwlock_timedrdlock- used relative not absolute time
+ pthread_rwlock_timedwrlock- used relative not absolute time
+ sem_timedwait - could block forever
* libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-object.c,
libmisc/monitor/monitor.h, libmisc/shell/main_chmod.c,
libmisc/shell/main_tty.c, libmisc/shell/main_umask.c,
libmisc/shell/main_whoami.c: Add pthread command to monitor when
POSIX is enabled. Remove include of rtems/monitor.h from files not
related.
* new-exceptions/bspsupport/vectors_init.c: added
features to C_exception_handler() (the default global
handler):
- try to catch recursion
- print info about context where the exception occurred
(ISR or task with task ID).
- suspend offending task rather than spinning forever.
* new-exceptions/bspsupport/vectors_init.c: must not
align start of stack downwards (we don't 'own' memory
below start). Instead, use original boundaries but
align the stack pointer as required.
Added test to verify that R13 was loaded with _SDA_BASE_
during early initialization (low-level assembly code
relies on it).
* new-exceptions/bspsupport/ppc_exc_asm_macros.h: Added
a test to TEST_LOCK_crit so that a context switch is
always prevented if MSR_CE is not set in the interrupt mask.
(Support mode where the user wants to leave MSR_CE always enabled
but abstains from calling OS primitives from the exception
handler.)
* libmisc/shell/shell.c, libmisc/shell/shell.h: New argument sequence
for rtems_shell_init(). This makes it possible to run the shell
forever or invoke it from a program as a subroutine, have a user
enter commands, and wait for it to exit.