Anonymous | Login | 2024-12-04 06:24 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Type | Date Submitted | Last Update | ||
0000592 | [1003.1(2008)/Issue 7] Base Definitions and Headers | Objection | Omission | 2012-07-13 01:48 | 2024-06-11 08:52 | ||
Reporter | eblake | View Status | public | ||||
Assigned To | ajosey | ||||||
Priority | normal | Resolution | Accepted | ||||
Status | Closed | ||||||
Name | Eric Blake | ||||||
Organization | Red Hat | ||||||
User Reference | ebb.timespec | ||||||
Section | trace.h, others | ||||||
Page Number | 426 | ||||||
Line Number | 14305 | ||||||
Interp Status | --- | ||||||
Final Accepted Text | |||||||
Summary | 0000592: consistent use of struct timespec | ||||||
Description |
Most headers that use struct timespec require that it be defined as in <time.h> (<aio.h> line 7210, <mqueue.h> line 9846, <pthread.h> line 10543, <sched.h> line 10756, <signal.h> line 10967, <sys/select.h> line 12650, <sys/stat.h> line 13044). However, while <semaphore.h> permits the inclusion of <time.h> (line 10892), it does not require it and does not mandate that a forward reference to struct timespec be in place before the declaration of sem_timedwait(), which means that the declaration could be inadvertently declaring a pointer to a unique type if the headers are included in the wrong order. Worse, <trace.h> directly uses struct timespec (line 14264), but does not require either the type to exist nor the use of <time.h>. Both of these go against the goal of Issue 7 in making more headers self-contained. Finally, a number of functions list the inclusion of <time.h> in their SYNOPSIS section, supposedly to guarantee the correct struct timespec, although this is redundant as demonstrated by the requirements listed above. |
||||||
Desired Action |
After line 10877 (XBD <semaphore.h> DESCRIPTION), add a paragraph: The <semaphore.h> header shall define the struct timespec structure as described in <time.h>. After line 14305 (XBD <trace.h> DESCRIPTION), add a paragraph: The <trace.h> header shall define the struct timespec structure as described in <time.h>. At line 14390 (XBD <trace.h> SEE ALSO), add a link to <time.h>. Delete lines 43751-43752 (XSH mq_receive SYNOPSIS): #include <mqueue.h> #include <time.h> Delete this sentence at line 43785 (XSH mq_receive DESCRIPTION): The timespec argument is defined in the <time.h> header. Delete lines 43849-43850 (XSH mq_send SYNOPSIS). #include <mqueue.h> #include <time.h> Delete this sentence at line 43883 (XSH mq_send DESCRIPTION): The timespec argument is defined in the <time.h> header. Delete line 43979 (XSH mq_timedreceive SYNOPSIS): #include <time.h> Delete line 43989 (XSH mq_timedsend SYNOPSIS): #include <time.h> Delete line 47520 (XSH posix_trace_attr_getclockres SYNOPSIS): #include <time.h> Delete this sentence at line 48642 (XSH posix_trace_getnext_event DESCRIPTION): The timespec data type is defined in the <time.h> header. Delete line 52844 (XSH pthread_mutex_timedlock SYNOPSIS): #include <time.h> Delete this sentence at line 52857 (XSH pthread_mutex_timedlock DESCRIPTION): The timespec data type is defined in the <time.h> header. Delete line 53864 (XSH pthread_rwlock_timedrdlock SYNOPSIS): #include <time.h> Delete this sentence at line 53876 (XSH pthread_rwlock_timedrdlock DESCRIPTION): The timespec data type is defined in the <time.h> header. Delete line 53927 (XSH pthread_rwlock_timedwrlock SYNOPSIS): #include <time.h> Delete this sentence at line 53939 (XSH pthread_rwlock_timedwrlock DESCRIPTION): The timespec data type is defined in the <time.h> header. Delete line 58251 (XSH sem_timedwait SYNOPSIS): #include <time.h> Delete this sentence at line 58264 (XSH sem_timedwait DESCRIPTION): The timespec data type is defined as a structure in the <time.h> header. |
||||||
Tags | issue8 | ||||||
Attached Files | |||||||
|
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |