Commit Graph

4146 Commits

Author SHA1 Message Date
Sebastian Huber
af9115f35c posix: Simplify POSIX_API_Control
Return stack area via pthread_getattr_np().

Simplify

* pthread_attr_setaffinity_np(), and
* pthread_attr_getaffinity_np()

and let the scheduler do the more sophisticated error checks.

Make

* pthread_setaffinity_np(),
* pthread_getaffinity_np(),
* pthread_attr_setaffinity_np(), and
* pthread_attr_getaffinity_np()

available in all configurations.

Update #2514.
Close #3145.
Close #3168.
2017-10-09 14:52:58 +02:00
Sebastian Huber
6489bcbfee psxtests/psx05: Fix timeout calculation
Update #3111.
2017-10-09 07:23:32 +02:00
Sebastian Huber
de59c065c5 posix: Implement self-contained POSIX mutex
POSIX mutexes are now available in all configurations and no longer
depend on --enable-posix.

Update #2514.
Update #3112.
2017-10-05 14:29:02 +02:00
Sebastian Huber
5222488573 posix: Implement self-contained POSIX condvar
POSIX condition variables are now available in all configurations and no
longer depend on --enable-posix.

Update #2514.
Update #3113.
2017-10-05 14:29:02 +02:00
Sebastian Huber
89fc9345de posix: Implement self-contained POSIX rwlocks
POSIX rwlocks are now available in all configurations and no longer
depend on --enable-posix.

Update #2514.
Update #3115.
2017-10-05 14:29:02 +02:00
Sebastian Huber
e67929c4c0 posix: Implement self-contained POSIX barriers
POSIX barriers are now available in all configurations and no longer
depend on --enable-posix.

Update #2514.
Update #3114.
2017-10-05 14:29:01 +02:00
Sebastian Huber
c090db7405 posix: Implement self-contained POSIX semaphores
For semaphore object pointer and object validation see
POSIX_SEMAPHORE_VALIDATE_OBJECT().

Destruction or close of a busy semaphore returns an error status.  The
object is not flushed.

POSIX semaphores are now available in all configurations and no longer
depend on --enable-posix.

Update #2514.
Update #3116.
2017-10-05 14:29:01 +02:00
Sebastian Huber
bdc468a9c5 posix: Allow PTHREAD_PROCESS_SHARED for rwlocks
Close #3153.
2017-09-22 08:24:57 +02:00
Joel Sherrill
714cb06f18 psxrdwrv/test.c: Clear iovec to ensure consistent results
closes #3148.
2017-09-21 10:16:46 -05:00
Sebastian Huber
c030edde3f posix: Allow PTHREAD_PROCESS_SHARED for condvar
Close #3137.
2017-09-15 13:57:53 +02:00
Sebastian Huber
8230a329d3 posix: Allow PTHREAD_PROCESS_SHARED for barriers
Close #3126.
2017-09-15 13:57:53 +02:00
Sebastian Huber
3b47ce73fa posix: Allow PTHREAD_PROCESS_SHARED for mutexes
Close #3125.
2017-09-15 13:57:38 +02:00
Sebastian Huber
ac741625b0 libio: Use FIFO for iop free list
Update #3136.
2017-09-15 10:55:38 +02:00
Sebastian Huber
baef823cd5 libio: Add hold/drop iop reference
Check iop reference count in close() and return -1 with errno set to
EBUSY in case the file descriptor is still in use.

Update #3132.
2017-09-15 10:29:34 +02:00
Sebastian Huber
0169e90e84 libio: Do simple parameter checks early
This simplifies error handling later.

Update #3132.
2017-09-15 07:33:43 +02:00
Sebastian Huber
62f3fa84aa fstests/fsimfsgeneric01: Fix test assert 2017-09-14 07:02:29 +02:00
Sebastian Huber
18b32d7635 posix: Ignore pshared for semaphores
Since we have only one process, sharing between processes is trivial.

Close #3124.
2017-09-12 11:50:39 +02:00
Sebastian Huber
fae59c9b42 dosfs: Support a cluster size of 64KiB
Close #3003.
2017-09-06 10:20:46 +02:00
Joel Sherrill
d85d2676e1 psxconfig01/init.c: Fix printf() format warnings 2017-08-27 14:11:43 -05:00
Joel Sherrill
8b29f9b9e8 sp25/task1.c: Fix printf() format warnings 2017-08-27 14:11:24 -05:00
Joel Sherrill
37f0023fde spstkalloc02/init.c: Fix printf() format warnings 2017-08-27 14:09:34 -05:00
Sebastian Huber
02b007e11e Include missing <limits.h>
Update #2132.
2017-08-25 14:39:38 +02:00
Sebastian Huber
80a13ec48d samples/fileio: Give command availability hint
Close #3088.
2017-08-24 08:44:22 +02:00
Sebastian Huber
a8f4fd2872 smptests: Fix format specifier
Update #3082.
2017-08-22 14:18:58 +02:00
Joel Sherrill
3ebbabbb93 psximfs02/init.c: Increase size of buffer to avoid overwrite 2017-07-28 15:53:21 -05:00
Joel Sherrill
bed7ec11b8 psxmmap01/init.c: Correct printf() format specifier 2017-07-28 11:24:34 -05:00
Sebastian Huber
77cbb2a444 psxtests/psxmmap01: Fix warning
Update #2859.
2017-07-28 13:53:43 +02:00
Sebastian Huber
9d1522ed32 Fix IO control request type 2017-07-28 13:28:11 +02:00
Sebastian Huber
7f1e6fa369 libtests/block08: Fix format warning 2017-07-28 12:19:05 +02:00
Joel Sherrill
3fd019739f psxmmap01/test_helper.c: Use correct printf format for size_t 2017-07-27 17:29:24 -05:00
Joel Sherrill
3a3d85c606 psxmmap01/test_driver.c: Fix mmap_h handler type mismatch 2017-07-27 17:29:02 -05:00
Sebastian Huber
146adb1edf sparc: Add lazy floating point switch
The SPARC ABI is a bit special with respect to the floating point context.
The complete floating point context is volatile.  Thus, from an ABI point
of view nothing needs to be saved and restored during a context switch.
Instead the floating point context must be saved and restored during
interrupt processing.  Historically, the deferred floating point switch was
used for SPARC and the complete floating point context is saved and
restored during a context switch to the new floating point unit owner.
This is a bit dangerous since post-switch actions (e.g. signal handlers)
and context switch extensions may silently corrupt the floating point
context.

The floating point unit is disabled for interrupt handlers.  Thus, in case
an interrupt handler uses the floating point unit then this will result in a
trap (INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT).

In uniprocessor configurations, a lazy floating point context switch is
used.  In case an active floating point thread is interrupted (PSR[EF] == 1)
and a thread dispatch is carried out, then this thread is registered as the
floating point owner.  When a floating point owner is present during a
context switch, the floating point unit is disabled for the heir thread
(PSR[EF] == 0).  The floating point disabled trap checks that the use of the
floating point unit is allowed and saves/restores the floating point context
on demand.

Update #3077.
2017-07-25 11:41:12 +02:00
Sebastian Huber
600d88dfd7 INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT
Add new fatal error INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT.

Update #3077.
2017-07-25 11:41:11 +02:00
Sebastian Huber
1c256e6fbe tmtests/tmcontext01: Prevent GCC 7.1 optimizations
It is getting harder to prevent the compiler from optimizing away the
recursive function calls.
2017-07-20 11:39:07 +02:00
Sebastian Huber
5f1ae90e18 sptests/sptls02: Use standard test IO
Update #3076.
2017-07-19 16:01:09 +02:00
Sebastian Huber
0ea7ca9ea8 sptests/spcache01: Use standard test IO
Update #3076.
2017-07-19 15:55:44 +02:00
Sebastian Huber
a0271a704b tests: Use floating point task
These tests directly or indirectly use fprintf(), etc. which may use the
floating point unit.

Update #3076.
2017-07-19 15:55:43 +02:00
Sebastian Huber
96ce1ec743 smptests/smpscheduler02: Remove invalid assert
Update #3059.
2017-07-19 13:03:13 +02:00
Sebastian Huber
7ad82395c4 smptests/smpscheduler01: Use right scheduler
Update #3063.
2017-07-19 12:58:55 +02:00
Sebastian Huber
6f46848079 tests: Use floating point task
These tests directly or indirectly use fprintf(), etc. which may use the
floating point unit.

Update #3076.
2017-07-19 11:57:01 +02:00
Sebastian Huber
07e178005a tests: Use floating point task
These tests directly or indirectly use fprintf(), etc. which may use the
floating point unit.

Update #3076.
2017-07-18 14:14:34 +02:00
Sebastian Huber
533ac1126c tests: Use more integer print functions
This avoids an unnecessary use of the floating point unit.

Update #3076.
2017-07-18 14:13:47 +02:00
Kevin Kirspel
1549beb15b psxtests: Add a mmap dedicated test case
Updates #2859
2017-07-14 16:04:05 -04:00
Sebastian Huber
ecabd38496 rtems: Add rtems_scheduler_ident_by_processor_set
Update #3070.
2017-07-11 14:16:59 +02:00
Sebastian Huber
548d65a52b rtems: Add rtems_scheduler_ident_by_processor()
Update #3069.
2017-07-11 14:16:58 +02:00
Sebastian Huber
4a1bdd3045 score: Fix set scheduler
Ensure that the thread processor affinity fits the new scheduler
instance.

Update #3059.
2017-07-10 07:49:40 +02:00
Sebastian Huber
34487537ce score: Add simple affinity support to EDF SMP
Update #3059.
2017-07-10 07:49:36 +02:00
Sebastian Huber
e745ec59d8 smptests/smpstrongapa01: Simplify
Update #3059.
2017-07-07 07:56:25 +02:00
Sebastian Huber
16347a6b39 score: Fix default set affinity
The set of online processors must be a subset of the thread processor
affinity for the schedulers without arbitrary processor affinity support
to avoid problems in case of processor addition and removal.

Update #3059.
2017-07-07 07:56:24 +02:00
Sebastian Huber
76d119857f score: Introduce _SMP_Get_online_processors()
Update #3059.
2017-07-07 07:55:03 +02:00