#2514 closed enhancement (fixed)

Make POSIX API mandatory (except signals and the sporadic server)

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: posix Version:
Severity: normal Keywords:
Cc: Blocked By: #3551
Blocking:

Description (last modified by Sebastian Huber)

The POSIX API is currently a build-time configuration option. In general it is beneficial to avoid build-time configuration options since this reduces the testing scope.

Applications not using the POSIX API should observe only a minimal overhead due to this change.

This enhancement depends on #2408.

Attachments (1)

0001-RTEMS-Self-contained-POSIX-objects.patch (5.7 KB) - added by Sebastian Huber on 10/05/17 at 05:20:56.

Download all attachments as: .zip

Change History (59)

comment:1 Changed on 01/07/16 at 09:10:38 by Sebastian Huber

Description: modified (diff)

comment:2 Changed on 01/08/16 at 08:02:42 by Sebastian Huber <sebastian.huber@…>

In fe100e16117c36c40e99a853d09cd8dcf98dbff0/rtems:

score: Add fatal errors for NULL entry init tasks

This simplifies the global construction.

Update #2514.

comment:3 Changed on 01/08/16 at 08:37:30 by Sebastian Huber

In [44e987192e47910b8551a8f9409e9cd6133695d1/rtems]:

score: Avoid dead code in global construction

Update #2514.

Last edited on 01/08/16 at 08:38:01 by Sebastian Huber (previous) (diff)

comment:4 Changed on 01/11/16 at 07:47:12 by Sebastian Huber <sebastian.huber@…>

In ccd54344d904b657123e4e4ba795a32212382be2/rtems:

score: Introduce Thread_Entry_information

This avoids potential dead code in _Thread_Handler(). It gets rid of
the dangerous function pointer casts.

Update #2514.

comment:5 Changed on 01/26/16 at 09:26:22 by Sebastian Huber <sebastian.huber@…>

In 885c342e043f2281a0bc707cd0bc59726d1c4b79/rtems:

mpci: Update due to API changes

Update due to API changes introduced by
ccd54344d904b657123e4e4ba795a32212382be2.

Update #2514.

comment:6 Changed on 01/31/17 at 09:13:49 by Sebastian Huber

Milestone: 4.125.0
Version: 4.12

comment:7 Changed on 05/11/17 at 10:05:24 by Sebastian Huber

The signals implementation is some (severe) defects:

#2100
#2263
#2607
#2716
#2690

Fixing them is a major work package. I suggest to enable the non-signal related stuff of the POSIX API by default.

Version 0, edited on 05/11/17 at 10:05:24 by Sebastian Huber (next)

Changed on 10/05/17 at 05:20:56 by Sebastian Huber

comment:8 Changed on 10/05/17 at 12:34:58 by Sebastian Huber <sebastian.huber@…>

In 76d9db3/rtems-source-builder:

4.12: Update to Newlib 2.5.0.20170922

The time_t is now a 64-bit signed integer.

This update includes a patch to introduce the self-contained POSIX
synchronization objects.

Update #2514.
Update #3111.
Update #3112.
Update #3113.
Update #3114.
Update #3115.
Update #3116.

comment:9 Changed on 10/05/17 at 12:35:53 by Sebastian Huber <sebastian.huber@…>

In e46a075/rtems:

Enforce compatible Newlib version

This Newlib check ensures that we have a 64-bit time_t and
self-contained POSIX synchronization objects.

Update #2514.
Update #3111.
Update #3112.
Update #3113.
Update #3114.
Update #3115.
Update #3116.

comment:10 Changed on 10/05/17 at 12:36:18 by Sebastian Huber <sebastian.huber@…>

In c090db7/rtems:

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.

comment:11 Changed on 10/05/17 at 12:36:31 by Sebastian Huber <sebastian.huber@…>

In e67929c/rtems:

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.

comment:12 Changed on 10/05/17 at 12:36:43 by Sebastian Huber <sebastian.huber@…>

In 89fc9345/rtems:

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.

comment:13 Changed on 10/05/17 at 12:36:56 by Sebastian Huber <sebastian.huber@…>

In 5222488/rtems:

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.

comment:14 Changed on 10/05/17 at 12:37:09 by Sebastian Huber <sebastian.huber@…>

In de59c065/rtems:

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.

comment:15 Changed on 10/10/17 at 05:43:49 by Sebastian Huber <sebastian.huber@…>

In af9115f3/rtems:

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.

comment:16 Changed on 10/10/17 at 05:44:03 by Sebastian Huber <sebastian.huber@…>

In da9f5f1/rtems:

posix: Remove rtems_pthread_attribute_compare()

Update #2514.
Close #3174.

comment:17 Changed on 10/10/17 at 05:44:17 by Sebastian Huber <sebastian.huber@…>

In 8c5267a/rtems:

posix: Simplify pthread_attr_setstack()

Simplify

  • pthread_attr_setstack(), and
  • pthread_attr_setstacksize().

Update #2514.

comment:18 Changed on 10/10/17 at 05:44:29 by Sebastian Huber <sebastian.huber@…>

In 4f9ed26/rtems:

posix: Constify default thread processor affinity

Set default thread processor affinity to all processors of the
pre-allocated set. This allows to constify the
_POSIX_Threads_Default_attributes.

Update #2514.

comment:19 Changed on 10/10/17 at 05:44:43 by Sebastian Huber <sebastian.huber@…>

In bd5be58f/rtems:

posix: Unconditional thread attribute support

Update #2514.

comment:20 Changed on 10/11/17 at 05:39:29 by Sebastian Huber <sebastian.huber@…>

In a3ad4af/rtems:

posix: Validate affinity sets by the scheduler

Update #2514.

comment:21 Changed on 10/11/17 at 05:39:43 by Sebastian Huber <sebastian.huber@…>

In b2dbb634/rtems:

score: Remove CPU_set_Control

Use Processor_mask instead.

Update #2514.

comment:22 Changed on 10/11/17 at 06:34:14 by Sebastian Huber <sebastian.huber@…>

In 16aaf73b/rtems:

smpaffinity01: Fix test case

Update #2514.

comment:23 Changed on 10/11/17 at 12:09:24 by Sebastian Huber

Component: unspecifiedposix
Milestone: 5.04.12.0
Status: newaccepted
Summary: Make POSIX API mandatoryMake POSIX API mandatory (except signals and the sporadic server)

comment:24 Changed on 10/12/17 at 05:20:28 by Sebastian Huber <sebastian.huber@…>

In 58500540/rtems:

posix: Fix const qualifier warning

Update #2514.
Update #3179.

comment:25 Changed on 10/18/17 at 06:52:20 by Sebastian Huber <sebastian.huber@…>

In 2be22d4/rtems:

posix: Move POSIX_API_Control::thread

This member is only used by the sporadic server support.

Update #2514.

comment:26 Changed on 10/18/17 at 06:52:32 by Sebastian Huber <sebastian.huber@…>

In 3f3f424/rtems:

posix: Remove POSIX_API_Control::schedparam

Move sporadic server scheduler parameters to
POSIX_API_Control::Sporadic. Remove redundant scheduler priority
parameter.

Update #2514.

comment:27 Changed on 10/18/17 at 06:52:44 by Sebastian Huber <sebastian.huber@…>

In 37eb717/rtems:

posix: Simplify _POSIX_Threads_Create_extension()

Move unblocked signals initialization to pthread_create().

Update #2514.

comment:28 Changed on 10/18/17 at 07:34:22 by Sebastian Huber <sebastian.huber@…>

In dbb30e26/rtems:

posix: Fix POSIX disabled build

Update #2514.

comment:29 Changed on 10/23/17 at 05:13:34 by Sebastian Huber <sebastian.huber@…>

In eeb8d83/rtems:

posix: Fix POSIX disabled build

Update #2514.

comment:30 Changed on 11/02/17 at 10:25:59 by Sebastian Huber <sebastian.huber@…>

In 81fd79d/rtems:

smppsxaffinity02: Fix thread attribute usage

The pthread_getattr_np() returns now the stack address and size. Do not
use this stack for the new threads.

Update #2514.
Update #3145.
Update #3168.

comment:31 Changed on 11/09/17 at 06:27:14 by Sebastian Huber

Milestone: 4.12.05.1

Milestone renamed

comment:32 Changed on 11/09/17 at 07:13:44 by Sebastian Huber <sebastian.huber@…>

In 7147dc4/rtems:

posix: Remove POSIX_API_Control::schedpolicy

Use the thread CPU budget algorithm to determine the scheduler policy.
This fixes also pthread_getschedparam() for Classic tasks.

Update #2514.

comment:33 Changed on 11/09/17 at 07:13:56 by Sebastian Huber <sebastian.huber@…>

In 64ba1a96/rtems:

posix: Change created_with_explicit_scheduler

Remove POSIX_API_Control::created_with_explicit_scheduler. Add
Thread_Control::was_created_with_inherited_scheduler. This fixes also
pthread_getattr_np() for Classic tasks.

Update #2514.

comment:34 Changed on 11/21/17 at 07:09:15 by Sebastian Huber <sebastian.huber@…>

In c0d602e/rtems:

posix: _POSIX_Threads_Get_sched_param_sporadic()

Remove api parameter to simplify the calling functions.

Update #2514.

comment:35 Changed on 06/18/18 at 07:54:07 by Sebastian Huber <sebastian.huber@…>

In 49fd910/rtems-docs:

c-user: Remove obsolete RTEMS_SYSINIT_CPU_SET

Update #2514.

comment:36 Changed on 10/13/18 at 22:41:39 by Joel Sherrill

Sebastian.. since this hasn't been touched in a few months, is this complete?

comment:37 Changed on 10/15/18 at 05:31:34 by Sebastian Huber

Progress on this ticket was blocked by several things. I hope to close it soon.

comment:38 Changed on 10/15/18 at 06:21:45 by Sebastian Huber

Blocked By: 3551 added

comment:39 Changed on 10/23/18 at 14:03:05 by Sebastian Huber <sebastian.huber@…>

In dd804bb/rtems:

posix: Provide cancel state/type by default

Sort POSIX sources lexicographically in Makefile.am

Update #2514.

comment:40 Changed on 10/23/18 at 14:03:09 by Sebastian Huber <sebastian.huber@…>

In 0b2808ce/rtems:

posix: Provide scheduler support by default

Update #2514.

comment:41 Changed on 10/23/18 at 14:03:12 by Sebastian Huber <sebastian.huber@…>

In 8d81622/rtems:

posix: Provide non-thread functions by default

Update #2514.

comment:42 Changed on 10/25/18 at 08:06:11 by Sebastian Huber <sebastian.huber@…>

In 4a7be22/rtems:

posix: Fix build with POSIX API disabled

Update #2514.

comment:43 Changed on 10/25/18 at 08:06:22 by Sebastian Huber <sebastian.huber@…>

In 135cb10/rtems:

posix: Provide more functions by default

Update #2514.

comment:44 Changed on 10/30/18 at 06:11:25 by Sebastian Huber <sebastian.huber@…>

In 0dbf67b/rtems:

posix: Provide aio_suspend() by default

Update #2514.

comment:45 Changed on 10/30/18 at 06:11:34 by Sebastian Huber <sebastian.huber@…>

In 5090a71b/rtems:

score: Remove bogus thread object name support

Update #2514.

comment:46 Changed on 10/30/18 at 06:11:42 by Sebastian Huber <sebastian.huber@…>

In 7038271/rtems:

Remove RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES

Enable support for string objects names unconditionally. Add const
qualifier throughout. Split _Objects_Namespace_remove() into
_Objects_Namespace_remove_u32() and _Objects_Namespace_remove_string()
to avoid an unnecessary dependency on _Workspace_Free().

Update #2514.

comment:47 Changed on 10/30/18 at 06:11:58 by Sebastian Huber <sebastian.huber@…>

In e97806a/rtems:

posix: Split posix_api_configuration_table

Use separate configuration variables to avoid false dependencies.

Update #2514.

comment:48 Changed on 10/30/18 at 06:12:06 by Sebastian Huber <sebastian.huber@…>

In 9318cfb0/rtems:

posix: Provide named semaphores by default

Update #2514.

comment:49 Changed on 10/30/18 at 06:12:14 by Sebastian Huber <sebastian.huber@…>

In 701057e0/rtems:

posix: Provide shared memory objects by default

Update #2514.

comment:50 Changed on 10/30/18 at 06:12:21 by Sebastian Huber <sebastian.huber@…>

In fe7aefd5/rtems:

posix: Provide message queues by default

Update #2514.

comment:51 Changed on 10/30/18 at 06:12:29 by Sebastian Huber <sebastian.huber@…>

In 033f31c8/rtems:

posix: Hide POSIX_API_Control by default

Update #2514.

comment:52 Changed on 10/30/18 at 06:12:37 by Sebastian Huber <sebastian.huber@…>

In 54f35888/rtems:

posix: Provide threads by default

Update #2514.

comment:53 Changed on 10/30/18 at 06:12:45 by Sebastian Huber <sebastian.huber@…>

In ef16a11/rtems:

posix: Enable psxtmtests tests by default

Update #2514.

comment:54 Changed on 10/30/18 at 06:12:54 by Sebastian Huber <sebastian.huber@…>

In 24f3e8f/rtems:

posix: Enable more smptests tests by default

Update #2514.

comment:55 Changed on 10/30/18 at 06:13:02 by Sebastian Huber <sebastian.huber@…>

In 8dc1ed1/rtems:

posix: Enable more psxtests by default

Update #2514.

comment:56 Changed on 10/30/18 at 06:13:10 by Sebastian Huber <sebastian.huber@…>

In bb3484c9/rtems:

posix: Enable more sptests test cases by default

Update #2514.

comment:57 Changed on 11/05/18 at 06:19:24 by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: acceptedclosed

In dd1c262/rtems-docs:

c-user: Update POSIX API configuration

Close ##2514.

comment:58 Changed on 05/18/20 at 07:05:33 by Sebastian Huber <sebastian.huber@…>

In 934cbe7/rtems:

posix: Get real priority in pthread_getattr_np()

This is in line with pthread_setschedparam() and
pthread_getschedparam().

Update #2514.

Note: See TracTickets for help on using tickets.