Newer
Older
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
not obtained from <I>pthread_key_create()</I> or after a key has been
deleted with <I>pthread_key_delete()</I> is undefined.
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>key</I>. The data key to get the binding for.
</UL>
<P>
<B>Returned Values:</B>
<P>
The function <I>pthread_getspecific()</I> returns the thread-
specific data associated with the given key. If no
thread specific data is associated with the key, then
the value <I>NULL</I> is returned.
<P>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<UL>
<LI>pthread_getspecific() may be called from a thread-specific data
destructor function.
</UL>
<H3><a name="pthreadkeydelete">2.9.25 pthread_key_delete</A></H3>
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_key_delete( pthread_key_t key )
</PRE>
<P>
<B>Description:</B>
<P>
This POSIX function should delete a thread-specific data
key previously returned by <I>pthread_key_create()</I>. However,
this function does nothing in the present implementation.
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>key</I>. The key to delete
</UL>
<P>
<B>Returned Values:</B>
<P>
<UL>
<LI>Always returns <I>EINVAL</I>.
</UL>
<P>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadmutexattrinit">2.9.26 pthread_mutexattr_init</A></H3>
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_mutexattr_init(pthread_mutexattr_t *attr);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_mutexattr_init()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadmutexattrdestroy">2.9.27 pthread_mutexattr_destroy</A></H3>
<P>
<B>Function Protoype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_mutexattr_destroy()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadmutexattrgetpshared">2.9.28 pthread_mutexattr_getpshared</A></H3>
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr,
int *pshared);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_mutexattr_getpshared()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadmutexattrsetpshared">2.9.29 pthread_mutexattr_setpshared</A></H3>
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr,
int pshared);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_mutexattr_setpshared()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadmutexinit">2.9.30 pthread_mutex_init</A></H3>
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_mutex_init(pthread_mutex_t *mutex,
pthread_mutexattr_t *attr);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_mutex_init()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadmutexdestrory">2.9.31 pthread_mutex_destroy</A></H3>
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_mutex_destroy(pthread_mutex_t *mutex);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_mutex_destroy()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadmutexlock">2.9.32 pthread_mutex_lock</A></H3>
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_mutex_lock(pthread_mutex_t *mutex);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_mutex_lock()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadmutextrylock">2.9.33 pthread_mutex_trylock</A></H3>
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_mutex_trylock(pthread_mutex_t *mutex);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_mutex_trylock()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadmutexunlock">2.9.34 pthread_mutex_unlock</A></H3>
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_mutex_unlock(pthread_mutex_t *mutex);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_mutex_unlock()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadconaddrinit">2.9.35 pthread_condattr_init</A></H3>
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_condattr_init(pthread_condattr_t *attr);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_condattr_init()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadocndattrdestroy">2.9.36 pthread_condattr_destroy</A></H3>
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_condattr_destroy(pthread_condattr_t *attr);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_condattr_destroy()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadcondinit">2.9.37 pthread_cond_init</A></H3>
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *attr);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_cond_init()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadconddestroy">2.9.38 pthread_cond_destroy</A></H3>
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_cond_destroy(pthread_cond_t *cond);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_cond_destroy()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadcondbroadcast">2.9.39 pthread_cond_broadcast</A></H3>
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_cond_broadcast(pthread_cond_t *cond);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_cond_broadcast()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadcondsignal">2.9.40 pthread_cond_signal</A></H3>
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_cond_signal(pthread_cond_t *dond);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_cond_signal()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadcondwait">2.9.41 pthread_cond_wait</A></H3>
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_cond_wait()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<H3><a name="pthreadcondtimedwait">2.9.42 pthread_cond_timedwait</A></H3>
<P>
<B>Function Prototype:</B>
<P>
<PRE>
#include <pthread.h>
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
const struct timespec *abstime);
</PRE>
<P>
<B>Description:</B>
<P>
<B>Input Parameters:</B>
<P>
<UL>
<LI><I>parm</I>
</UL>
<P>
<B>Returned Values:</B>
<P>
If successful, the <I>pthread_cond_timedwait()</I> function will return
zero (<I>OK</I>). Otherwise, an error number will be
returned to indicate the error:
<P>
<UL>
</UL>
<B>Assumptions/Limitations:</B>
<P>
<B>POSIX Compatibility:</B> Comparable to the POSIX
interface of the same name.
<P>
<HR>
<H1>3.0 <A NAME="Data_Structures">OS Data Structures</A></H1>
<H2>3.1 Scalar types</H2>
<P>
Many of the types used to communicate with NuttX are simple
scalar types. These types are used to provide architecture independence
of the OS from the application. The scalar types used at the NuttX
interface include:
<UL>
<LI>pid_t
<LI>size_t
<LI>sigset_t
<LI>STATUS
<LI>time_t
</UL>
<H2>3.2 Hidden Interface Structures</H2>
<P>
Several of the types used to interface with NuttX are
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
structures that are intended to be hidden from the application.
From the standpoint of the application, these structures (and
structure pointers) should be treated as simple handles to reference
OS resources. These hidden structures include:
<UL>
<LI>_TCB
<LI>mqd_t
<LI>sem_t
<LI>WDOG_ID
<LI>pthread_key_t
</UL>
<P>
In order to maintain portability, applications should not reference
specific elements within these hidden structures. These hidden
structures will not be described further in this user's manual.
<P>
<H2>3.3. Access to the <I>errno</I> Variable</H2>
<P>
A pointer to the thread-specific <I>errno</I>. value is available through a
function call:
<P>
<B>Function Prototype:</B>
<P>
<PRE> int *get_errno_ptr( void )</PRE>
<P>
<B>Description</B>: <I>osGetErrnorPtr()</I> returns a pointer to
the thread-specific <I>errno</I> value.
<P>
This differs somewhat from the use for errno in a multi-threaded process environment:
Each pthread will have its own private copy of errno and the errno will not be shared
between pthreads.
<P>
<B>Input Parameters</B>: None
<P>
<B>Returned Values</B>:
<P>
<UL>
<LI>A pointer to the thread-specific <I>errno</I> value.
</UL>
<P>
<H2>3.4 User Interface Structures</H2>
<P>
<H3>3.4.1 main_t</H3>
<P>
main_t defines the type of a task entry point. main_t is declared
in sys/types.h as:
<PRE>
typedef int (*main_t)(int argc, char *argv[]);
</PRE>
<H3>3.4.2 struct sched_param</H3>
<P>
This structure is used to pass scheduling priorities to and from
NuttX;
<PRE>
struct sched_param
{
int sched_priority;
};
</PRE>
<H3>3.4.3 struct timespec</H3>
<P>
This structure is used to pass timing information between the
NuttX and a user application:
<PRE>
struct timespec
{
time_t tv_sec; /* Seconds */
long tv_nsec; /* Nanoseconds */
};
</PRE>
<H3>3.4.4 struct mq_attr</H3>
<P>
This structure is used to communicate message queue attributes
between NuttX and a MoBY application:
<PRE>
struct mq_attr {
size_t mq_maxmsg; /* Max number of messages in queue */
size_t mq_msgsize; /* Max message size */
unsigned mq_flags; /* Queue flags */
size_t mq_curmsgs; /* Number of messages currently in queue */
};
</PRE>
<H3>3.4.5 struct sigaction</H3>
<P>
The following structure defines the action to take for given signal:
<PRE>
struct sigaction
{
union
{
void (*_sa_handler)(int);
void (*_sa_sigaction)(int, siginfo_t *, void *);
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
} sa_u;
sigset_t sa_mask;
int sa_flags;
};
#define sa_handler sa_u._sa_handler
#define sa_sigaction sa_u._sa_sigaction
</PRE>
<H3>3.4.6 struct siginfo/siginfo_t</H3>
<P>
The following types is used to pass parameters to/from signal
handlers:
<PRE>
typedef struct siginfo
{
int si_signo;
int si_code;
union sigval si_value;
} siginfo_t;
</PRE>
<H3>3.4.7 union sigval</H3>
<P>
This defines the type of the struct siginfo si_value field and
is used to pass parameters with signals.
<PRE>
union sigval
{
int sival_int;
void *sival_ptr;
};
</PRE>
<H3>3.4.8 struct sigevent</H3>
<P>
The following is used to attach a signal to a message queue to
notify a task when a message is available on a queue.
<PRE>
struct sigevent
{
int sigev_signo;
union sigval sigev_value;
int sigev_notify;
};
</PRE>
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
<H3>3.4.9 Watchdog Data Types</H3>
<p>
When a watchdog expires, the callback function with this
type is called:
</p>
<pre>
typedef void (*wdentry_t)(int argc, ...);
</pre>
<p>
Where argc is the number of uint32 type arguments that follow.
</p>
The arguments are passed as uint32 values.
For systems where the sizeof(pointer) < sizeof(uint32), the
following union defines the alignment of the pointer within the
uint32. For example, the SDCC MCS51 general pointer is
24-bits, but uint32 is 32-bits (of course).
</p>
<pre>
union wdparm_u
{
void *pvarg;
uint32 *dwarg;
};
typedef union wdparm_u wdparm_t;
</pre>
<p>
For most 32-bit systems, pointers and uint32 are the same size
For systems where sizeof(pointer) > sizeof(uint32), we will
have to do some redesign.
</p>
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
<h1><a name="FileSystem">2.10 Filesystem Interfaces</a></h1>
<p>
The NuttX filesystem is very simple; it does not involve any block drivers or
particular filesystem (like FAT or EXT2 etc.).
The NuttX filesystem simply supports a set a filesystem APIs
(<code>open()</code>, <code>close()</code>, <code>read()</code>, <code>write</code>, etc.)
and a registration mechanism that allows devices drivers to a associated with <i>nodes</i>
in a file-system-like name space.
</p>
<h2><a name="driveroperations">2.10.1 Driver Operations</a></h2>
<ul><pre>
#include <fcntl.h>
int open(const char *path, int oflag, ...);
</pre></ul>
<ul><pre>
#include <unistd.h>
int close(int fd);
int dup(int fildes);
int dup2(int fildes1, int fildes2);
off_t lseek(int fd, off_t offset, int whence); /* Prototyped but not implemented */
int read(int fd, void *buf, unsigned int nbytes);
int unlink(const char *path);
int write(int fd, const void *buf, unsigned int nbytes);
</pre></ul>
<ul><pre>
#include <sys/ioctl.h>
int ioctl(int fd, int req, unsigned long arg);
</pre></ul>
<h2><a name="directoryoperations">2.10.2 Directory Operations</a></h2>
<ul><pre>
#include <dirent.h>
int closedir(DIR *dirp);
FAR DIR *opendir(const char *path);
FAR struct dirent *readdir(FAR DIR *dirp);
int readdir_r(FAR DIR *dirp, FAR struct dirent *entry, FAR struct dirent **result);
void rewinddir(FAR DIR *dirp);
void seekdir(FAR DIR *dirp, int loc);
int telldir(FAR DIR *dirp);
</pre></ul>
<h2><a name="standardio">2.10.3 Standard I/O</a></h2>
<ul><pre>
#include <stdio.h>
int fclose(FILE *stream);
int fflush(FILE *stream);
int feof(FILE *stream); /* Prototyped but not implemented */
int ferror(FILE *stream); /* Prototyped but not implemented */
int fgetc(FILE *stream);
char *fgets(char *s, int n, FILE *stream);
FILE *fopen(const char *path, const char *type);
int fprintf(FILE *stream, const char *format, ...);
int fputc(int c, FILE *stream);
int fputs(const char *s, FILE *stream);
size_t fread(void *ptr, size_t size, size_t n_items, FILE *stream);
int fseek(FILE *stream, long int offset, int whence); /* Prototyped but not implemented */
size_t fwrite(const void *ptr, size_t size, size_t n_items, FILE *stream);
char *gets(char *s);
int printf(const char *format, ...);
int puts(const char *s);
int rename(const char *source, const char *target); /* Prototyped but not implemented */
int sprintf(char *dest, const char *format, ...);
int ungetc(int c, FILE *stream);
int vprintf(const char *s, va_list ap);
int vfprintf(FILE *stream, const char *s, va_list ap);
int vsprintf(char *buf, const char *s, va_list ap);
int chdir(const char *path); /* Prototyped but not implemented */
FILE *fdopen(int fd, const char *type);
int fstat(int fd, FAR struct stat *buf); /* Prototyped but not implemented */
char *getcwd(FAR char *buf, size_t size); /* Prototyped but not implemented */
int mkdir(const char *path, mode_t mode); /* Prototyped but not implemented */
int rmdir(const char *path); /* Prototyped but not implemented */
int stat(const char *path, FAR struct stat *buf); /* Prototyped but not implemented */
int statfs(const char *path, FAR struct statfs *buf); /* Prototyped but not implemented */
<li><a href="#clockgetres">clock_getres</a></li>
<li><a href="#clockgettime">clock_gettime</a></li>
<li><a href="#ClocksNTimers">Clocks</a></li>
<li><a href="#clocksettime">clock_settime</a></li>
<li><a href="#Data_Structures">Data structures</a></li>
<li><a href="#directoryoperations">Directory operations</a></li>
<li><a href="#driveroperations">Driver operations</a></li>
<li><a href="#FileSystem">Filesystem interfaces</a></li>
<li><a href="#gmtimer">gmtime_r</a></li>
<li><a href="#Introduction">Introduction</a>
<li><a href="#kill">kill</a></li>
<li><a href="#localtimer">localtime_r</a></li>
<li><a href="#mktime">mktime</a></li>
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
<li><a href="#mqclose">mq_close</a></li>
<li><a href="#mqgetattr">mq_getattr</a></li>
<li><a href="#mqnotify">mq_notify</a></li>
<li><a href="#mqopen">mq_open</a></li>
<li><a href="#mqreceive">mq_receive</a></li>
<li><a href="#mqsend">mq_send</a></li>
<li><a href="#mqsetattr">mq_setattr</a></li>
<li><a href="#mqunlink">mq_unlink</a></li>
<li><a href="#OS_Interfaces">OS Interfaces</a>
<li><a href="#pthreadattrdestroy">pthread_attr_destroy</a></li>
<li><a href="#pthreadattrgetinheritsched">pthread_attr_getinheritsched</a></li>
<li><a href="#pthreadattrgetschedparam">pthread_attr_getschedparam</a></li>
<li><a href="#pthreadattrgetschedpolicy">pthread_attr_getschedpolicy</a></li>
<li><a href="#pthreadattrgetstacksize">0 pthread_attr_getstacksize</a></li>
<li><a href="#pthreadattrinit">pthread_attr_init</a></li>
<li><a href="#pthreadattrsetinheritsched">pthread_attr_setinheritsched</a></li>
<li><a href="#pthreadattrsetschedparam">pthread_attr_setschedparam</a></li>
<li><a href="#pthreadattrsetschedpolity">pthread_attr_setschedpolicy</a></li>
<li><a href="#pthreadattrsetstacksize">pthread_attr_setstacksize</a></li>
<li><a href="#pthreadcancel">pthread_cancel</a></li>
<li><a href="#pthreadconaddrinit">pthread_condattr_init</a></li>
<li><a href="#pthreadcondbroadcast">pthread_cond_broadcast</a></li>
<li><a href="#pthreadconddestroy">pthread_cond_destroy</a></li>
<li><a href="#pthreadcondinit">pthread_cond_init</a></li>
<li><a href="#pthreadcondsignal">pthread_cond_signal</a></li>
<li><a href="#pthreadcondtimedwait">pthread_cond_timedwait</a></li>
<li><a href="#pthreadcondwait">pthread_cond_wait</a></li>
<li><a href="#pthreadcreate">pthread_create</a></li>
<li><a href="#pthreaddetach">pthread_detach</a></li>
<li><a href="#pthreadexit">pthread_exit</a></li>
<li><a href="#pthreadgetschedparam">pthread_getschedparam</a></li>
<li><a href="#pthreadgetspecific">pthread_getspecific</a></li>
<li><a href="#Pthread"><i>pthreads</i></a> share some resources.
<li><a href="#pthreadjoin">pthread_join</a></li>
<li><a href="#pthreadkeycreate">pthread_key_create</a></li>
<li><a href="#pthreadkeydelete">pthread_key_delete</a></li>
<li><a href="#pthreadmutexattrdestroy">pthread_mutexattr_destroy</a></li>
<li><a href="#pthreadmutexattrgetpshared">pthread_mutexattr_getpshared</a></li>
<li><a href="#pthreadmutexattrinit">pthread_mutexattr_init</a></li>
<li><a href="#pthreadmutexattrsetpshared">pthread_mutexattr_setpshared</a></li>
<li><a href="#pthreadmutexdestrory">pthread_mutex_destroy</a></li>
<li><a href="#pthreadmutexinit">pthread_mutex_init</a></li>
<li><a href="#pthreadmutexlock">pthread_mutex_lock</a></li>
<li><a href="#pthreadmutextrylock">pthread_mutex_trylock</a></li>
<li><a href="#pthreadmutexunlock">pthread_mutex_unlock</a></li>
<li><a href="#pthreadocndattrdestroy">pthread_condattr_destroy</a></li>
<li><a href="#Pthread">Pthread Interfaces</a>
<li><a href="#pthreadself">pthread_self</a></li>
<li><a href="#pthreadsetcancelstate">pthread_setcancelstate</a></li>
<li><a href="#pthreadsetschedparam">pthread_setschedparam</a></li>
<li><a href="#pthreadsetspecific">pthread_setspecific</a></li>
<li><a href="#pthreadtestcancelstate">pthread_testcancelstate</a></li>
<li><a href="#pthreadyield">pthread_yield</a></li>
<li><a href="#schedgetparam">sched_getparam</a></li>
<li><a href="#schedgetprioritymax">sched_get_priority_max</a></li>
<li><a href="#schedgetprioritymin">sched_get_priority_min</a></li>
<li><a href="#schedgetrrinterval">sched_get_rr_interval</a></li>
<li><a href="#schedlockcount">sched_lockcount</a></li>
<li><a href="#schedlock">sched_lock</a></li>
<li><a href="#schedsetparam">sched_setparam</a></li>
<li><a href="#schedsetscheduler">sched_setscheduler</a></li>
<li><a href="#schedunlock">sched_unlock</a></li>
<li><a href="#sched_yield">sched_yield</a></li>
<li><a href="#Semaphores">Counting Semaphore Interfaces</a>
<li><a href="#semclose">sem_close</a></li>
<li><a href="#semdestroy">sem_destroy</a></li>
<li><a href="#semgetvalue">sem_getvalue</a></li>
<li><a href="#seminit">sem_init</a></li>
<li><a href="#semopen">sem_open</a></li>
<li><a href="#sempost">sem_post</a></li>
<li><a href="#semtrywait">sem_trywait</a></li>
<li><a href="#semunlink">sem_unlink</a></li>
<li><a href="#semwait">sem_wait</a></li>
<li><a href="#setgetscheduler">sched_getscheduler</a></li>
<li><a href="#sigaction">sigaction</a></li>
<li><a href="#sigaddset">sigaddset</a></li>
<li><a href="#sigdelset">sigdelset</a></li>
<li><a href="#sigemptyset">sigemptyset</a></li>
<li><a href="#sigfillset">sigfillset</a></li>
<li><a href="#sigismember">sigismember</a></li>
<li><a href="#Signals">Signal Interfaces</a>
<li><a href="#sigpending">sigpending</a></li>
<li><a href="#sigprocmask">sigprocmask</a></li>
<li><a href="#sigqueue">sigqueue</a></li>
<li><a href="#sigsuspend">sigsuspend</a></li>
<li><a href="#sigtimedwait">sigtimedwait</a></li>
<li><a href="#sigwaitinfo">sigwaitinfo</a></li>
<li><a href="#standardio">Standard I/O</a></li>
<li><a href="#taskactivate">task_activate</a></li>
<li><a href="#Task_Control">Task Control Interfaces</a>
<li><a href="#taskcreate">task_create</a></li>
<li><a href="#taskdelete">task_delete</a></li>
<li><a href="#taskinit">task_init</a></li>
<li><a href="#taskrestart">task_restart</a></li>
<li><a href="#Task_Schedule">Task Scheduling Interfaces</a>
<li><a href="#Task_Switch">Task Switching Interfaces</a>
<li><a href="#timercreate">timer_create</a></li>
<li><a href="#timerdelete">timer_delete</a></li>
<li><a href="#timergetoverrun">timer_getoverrun</a></li>
<li><a href="#timergettime">timer_gettime</a></li>
<li><a href="#ClocksNTimers">Timers</a></li>
<li><a href="#timersettime">timer_settime</a></li>
<li><a href="#Watchdogs">Watchdog Timer Interfaces</a>
<li><a href="#wdcancel">wd_cancel</a></li>
<li><a href="#wdcreate">wd_create</a></li>
<li><a href="#wddelete">wd_delete</a></li>
<li><a href="#wdgettime">wd_gettime</a></li>