mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2008-02-05 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/Makefile.am: Remove these. They were proposed but never standardized. * posix/src/pthreadgetcputime.c, posix/src/pthreadsetcputime.c: Removed.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2008-02-05 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
* posix/Makefile.am: Remove these. They were proposed but never
|
||||||
|
standardized.
|
||||||
|
* posix/src/pthreadgetcputime.c, posix/src/pthreadsetcputime.c: Removed.
|
||||||
|
|
||||||
2007-12-23 Ralf Corsépius <ralf.corsepius@rtems.org>
|
2007-12-23 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
* libcsupport/src/sync.c: Make sync() POSIX-compliant.
|
* libcsupport/src/sync.c: Make sync() POSIX-compliant.
|
||||||
|
|||||||
@@ -110,8 +110,8 @@ libposix_a_SOURCES += src/mutex.c src/mutexattrdestroy.c \
|
|||||||
src/mutexunlock.c
|
src/mutexunlock.c
|
||||||
|
|
||||||
## PTHREAD_C_FILES
|
## PTHREAD_C_FILES
|
||||||
libposix_a_SOURCES += src/pthread.c src/pthreadsetcputime.c \
|
libposix_a_SOURCES += src/pthread.c \
|
||||||
src/pthreadgetcputime.c src/pthreadgetcpuclockid.c src/pthreadonce.c \
|
src/pthreadgetcpuclockid.c src/pthreadonce.c \
|
||||||
src/pthreadequal.c src/pthreadself.c src/pthreadexit.c \
|
src/pthreadequal.c src/pthreadself.c src/pthreadexit.c \
|
||||||
src/pthreaddetach.c src/pthreadjoin.c src/pthreadcreate.c \
|
src/pthreaddetach.c src/pthreadjoin.c src/pthreadcreate.c \
|
||||||
src/pthreadattrsetdetachstate.c src/pthreadattrgetdetachstate.c \
|
src/pthreadattrsetdetachstate.c src/pthreadattrgetdetachstate.c \
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* 20.1.7 CPU-time Clock Thread Creation Attribute, P1003.4b/Draft 8, p. 59
|
|
||||||
*
|
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
|
||||||
*
|
|
||||||
* The license and distribution terms for this file may be
|
|
||||||
* found in the file LICENSE in this distribution or at
|
|
||||||
* http://www.rtems.com/license/LICENSE.
|
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
int pthread_attr_getcputime(
|
|
||||||
pthread_attr_t *attr,
|
|
||||||
int *clock_allowed
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if ( !attr || !attr->is_initialized || !clock_allowed )
|
|
||||||
return EINVAL;
|
|
||||||
|
|
||||||
*clock_allowed = attr->cputime_clock_allowed;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
* 20.1.7 CPU-time Clock Thread Creation Attribute, P1003.4b/Draft 8, p. 59
|
|
||||||
*
|
|
||||||
* COPYRIGHT (c) 1989-1999.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
|
||||||
*
|
|
||||||
* The license and distribution terms for this file may be
|
|
||||||
* found in the file LICENSE in this distribution or at
|
|
||||||
* http://www.rtems.com/license/LICENSE.
|
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
int pthread_attr_setcputime(
|
|
||||||
pthread_attr_t *attr,
|
|
||||||
int clock_allowed
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if ( !attr || !attr->is_initialized )
|
|
||||||
return EINVAL;
|
|
||||||
|
|
||||||
switch ( clock_allowed ) {
|
|
||||||
case CLOCK_ENABLED:
|
|
||||||
case CLOCK_DISABLED:
|
|
||||||
attr->cputime_clock_allowed = clock_allowed;
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return EINVAL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user