#2171 new enhancement

new function for declaring a POSIX thread to be floating point or not via attribute

Reported by: steve.helmer Owned by: Joel Sherrill
Priority: low Milestone: Indefinite
Component: score Version:
Severity: minor Keywords:
Cc: sebastian.huber@… Blocked By:

Description (last modified by Sebastian Huber)

For those processors which have a builtin floating point unit there needs to be a way to specify whether or not posix threads (created with pthread_create) need to to save/restore the floating point context during a context switch. This is already the case for RTEMS tasks. I am submitting a patch for both rtems-4.10.2 and newlib-1.19.0 to accommodate a new field is_fp to the pthread_attr_t structure declared in newlib-1.19.0/newlib/libc/include/sys/types.h, declarations for 2 new functions in newlib-1.19.0/newlib/libc/include/pthread.h.

And the functions themselves to be added to rtems-4.10.2/cpukit/posix/src.

Attachments (4)

types.h (13.4 KB) - added by steve.helmer on 02/14/14 at 14:55:58.
sys/types.h header for newlib
pthread.h (12.2 KB) - added by steve.helmer on 02/14/14 at 14:57:48.
pthread.h for newlib
pthreadattrsetis_fp.c (716 bytes) - added by steve.helmer on 02/14/14 at 14:59:01.
new function pthread_attr_getis_fp
pthreadattrsetis_fp_v1.c (716 bytes) - added by steve.helmer on 02/14/14 at 14:59:52.
new function pthread_attr_setis_fp

Download all attachments as: .zip

Change History (8)

Changed on 02/14/14 at 14:55:58 by steve.helmer

Attachment: types.h added

sys/types.h header for newlib

Changed on 02/14/14 at 14:57:48 by steve.helmer

Attachment: pthread.h added

pthread.h for newlib

Changed on 02/14/14 at 14:59:01 by steve.helmer

Attachment: pthreadattrsetis_fp.c added

new function pthread_attr_getis_fp

Changed on 02/14/14 at 14:59:52 by steve.helmer

Attachment: pthreadattrsetis_fp_v1.c added

new function pthread_attr_setis_fp

comment:1 Changed on 02/14/14 at 15:04:28 by Sebastian Huber

Cc: Sebastian Huber added

comment:2 Changed on 02/14/14 at 15:48:53 by Joel Sherrill

This is not defined in any standard. Community would have to agree to add it, review of other OSes for similar pthread APIs, and they must end in _np.

I am not opposed to the functionality, just have to be careful when extending pthreads.

comment:3 Changed on 12/18/14 at 12:34:35 by Sebastian Huber

Description: modified (diff)
Milestone: 4.115.0
Priority: normallow

comment:4 Changed on 08/14/17 at 00:50:04 by Chris Johns

Milestone: 5.0Indefinite
Version: 4.10
Note: See TracTickets for help on using tickets.