From a5f9ac71eb86e7c880944cc2a9ad67ff66b5e6f4 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 30 Oct 2012 19:25:50 +0000 Subject: [PATCH] Documentation update git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5279 42af7a65-404d-4744-a932-0658087f49c3 --- Documentation/NuttXBinfmt.html | 10 +- Documentation/NuttxUserGuide.html | 1417 +++++++++++++++-------------- 2 files changed, 724 insertions(+), 703 deletions(-) diff --git a/Documentation/NuttXBinfmt.html b/Documentation/NuttXBinfmt.html index 8d70d0135a..71c5b0a003 100644 --- a/Documentation/NuttXBinfmt.html +++ b/Documentation/NuttXBinfmt.html @@ -50,8 +50,8 @@

Binary Loaders. The purpose of a binary loader is to load and execute modules in various binary formats that reside in a file system. - Loading refers instiating the binary module in some fashion, usually copy all or some of the binary module into memory and then linking the module with other components. - In most architectures, it is thebase FLASH code that is the primary component that the binary module must link with because that is where the RTOS and primary tasks reside. + Loading refers instantiating the binary module in some fashion, usually copy all or some of the binary module into memory and then linking the module with other components. + In most architectures, it is the base FLASH code that is the primary component that the binary module must link with because that is where the RTOS and primary tasks reside. Program modules can then be executed after they have been loaded.

@@ -76,14 +76,14 @@ NXFLAT. NuttX NXFLAT formatted files. More information about the NXFLAT binary format can be found in the - NXFLAT documentation. + NXFLAT documentation.

Executables and Libraries The generic binary loader logic does not care what it is that it being loaded. It could load an executable program or a library. There are no strict rules, but a library will tend to export symbols and a program will tend to import symbols: The program will use the symbols exported by the library. - However, at this point in time, none of the supported binary formts support exporting of symbols. + However, at this point in time, none of the supported binary formats support exporting of symbols.

@@ -128,7 +128,7 @@ struct binfmt_s

The load method is used to load the binary format into memory. - It returns either OK (0) meaning that the binary object was loaded successfully, or a negater errno indicating why the object was not loaded. + It returns either OK (0) meaning that the binary object was loaded successfully, or a negated errno indicating why the object was not loaded.

diff --git a/Documentation/NuttxUserGuide.html b/Documentation/NuttxUserGuide.html index 24dc6b6ab7..586b744c71 100644 --- a/Documentation/NuttxUserGuide.html +++ b/Documentation/NuttxUserGuide.html @@ -123,7 +123,7 @@ is discussed. Input Parameters: All input parameters are listed along with brief descriptions of each input parameter.

-Returned Values: All possible values returned by the interface +Returned Value: All possible values returned by the interface function are listed. Values returned as side-effects (through pointer input parameters or through global variables) will be addressed in the description of the interface function. @@ -207,10 +207,10 @@ paragraphs.

Function Prototype: -

-   #include <sched.h>
-   int task_create(char *name, int priority, int stack_size, main_t entry, const char *argv[]);
-
+

Description: @@ -249,18 +249,18 @@ paragraphs.

Input Parameters:

- Returned Values: + Returned Value:

- If the calling process has SA_NOCLDWAIT set or has SIGCHLD set to SIG_IGN, and the process has no unwaited-for children that were transformed into zombie processes, the calling thread will block until all of the children of the process containing the calling thread terminate, and waitpid() will fail and set errno to ECHILD. + If the calling process has SA_NOCLDWAIT set or has SIGCHLD set to SIG_IGN, and the process has no unwaited-for children that were transformed into zombie processes, the calling thread will block until all of the children of the process containing the calling thread terminate, and waitpid() will fail and set errno to ECHILD.

If waitpid() returns because the status of a child process is available, these functions will return a value equal to the process ID of the child process. @@ -1204,7 +1211,7 @@ on this thread of execution.

- Returned Values: + Returned Value:

If waitpid() returns because the status of a child process is available, it will return a value equal to the process ID of the child process for which status is reported. @@ -1261,10 +1268,10 @@ on this thread of execution. Input Parameters:

    -
  • func. A pointer to the function to be called when the task exits.
  • +
  • func. A pointer to the function to be called when the task exits.

- Returned Values: + Returned Value: On success, atexit() returns OK (0). On error, ERROR (-1) is returned, and errno is set to indicate the cause of the failure.

@@ -1301,11 +1308,11 @@ on this thread of execution. Input Parameters:

    -
  • func. A pointer to the function to be called when the task exits.
  • -
  • arg. An argument that will be provided to the on_exit() function when the task exits.
  • +
  • func. A pointer to the function to be called when the task exits.
  • +
  • arg. An argument that will be provided to the on_exit() function when the task exits.

- Returned Values: + Returned Value: On success, on_exit() returns OK (0). On error, ERROR (-1) is returned, and errno is set to indicate the cause of the failure.

@@ -1355,7 +1362,7 @@ on this thread of execution. Function Prototype:
     #include <mqueue.h>
-    mqd_t mq_open( const char *mqName, int oflags, ... );
+    mqd_t mq_open(const char *mqName, int oflags, ...);
 

@@ -1367,27 +1374,27 @@ until it is closed by a successful call to mq_close().

Input Parameters:

    -
  • mqName. Name of the queue to open -
  • oflags. Open flags. These may be any combination of: +
  • mqName. Name of the queue to open +
  • oflags. Open flags. These may be any combination of:
      -
    • O_RDONLY. Open for read access. -
    • O_WRONLY. Open for write access. -
    • O_RDWR. Open for both read & write access. -
    • O_CREAT. Create message queue if it does not already +
    • O_RDONLY. Open for read access. +
    • O_WRONLY. Open for write access. +
    • O_RDWR. Open for both read & write access. +
    • O_CREAT. Create message queue if it does not already exist. -
    • O_EXCL. Name must not exist when opened. -
    • O_NONBLOCK. Don't wait for data. +
    • O_EXCL. Name must not exist when opened. +
    • O_NONBLOCK. Don't wait for data.
    -
  • ... Optional parameters. +
  • ... Optional parameters. When the O_CREAT flag is specified, POSIX requires that a third and fourth parameter be supplied:
      -
    • mode. The mode parameter is of type mode_t. In the POSIX +
    • mode. The mode parameter is of type mode_t. In the POSIX specification, this mode value provides file permission bits for the message queue. This parameter is required but not used in the present implementation. -
    • attr. A pointer to an mq_attr that is provided to initialize. +
    • attr. A pointer to an mq_attr that is provided to initialize. the message queue. If attr is NULL, then the messages queue is created with implementation-defined default message queue attributes. If attr is non-NULL, then the message queue mq_maxmsg attribute is set to the @@ -1401,9 +1408,9 @@ message that can be sent or received. Other elements of attr are ignored

    -Returned Values: +Returned Value:

      -
    • A message queue descriptor or -1 (ERROR) +
    • A message queue descriptor or -1 (ERROR)

    @@ -1424,7 +1431,7 @@ message size is limited at 22 bytes. Function Prototype:

         #include <mqueue.h>
    -    int mq_close( mqd_t mqdes );
    +    int mq_close(mqd_t mqdes);
     

    @@ -1434,30 +1441,32 @@ The mq_close() deallocates any system resources allocated by the system for use by this task for its message queue.

    If the calling task has attached a notification request to the message -queue via this mqdes (see mq_notify()), this attachment will be +queue via this mqdes (see mq_notify()), this attachment will be removed and the message queue is available for another task to attach for notification.

    Input Parameters:

      -
    • mqdes. Message queue descriptor. +
    • mqdes. Message queue descriptor.

    -Returned Values: +Returned Value:

      -
    • 0 (OK) if the message queue is closed successfully, otherwise, --1 (ERROR). +
    • 0 (OK) if the message queue is closed successfully, otherwise, +-1 (ERROR).

    Assumptions/Limitations:

      -
    • The behavior of a task that is blocked on either a mq_send() or -mq_receive() is undefined when mq_close() is called. -
    • The result of using this message queue descriptor after successful -return from mq_close() is undefined. +
    • + The behavior of a task that is blocked on either a mq_send() or mq_receive() is undefined when mq_close() is called. +
    • +
    • + The result of using this message queue descriptor after successful return from mq_close() is undefined. +

    POSIX Compatibility: Comparable to the POSIX interface @@ -1469,7 +1478,7 @@ of the same name. Function Prototype:

         #include <mqueue.h>
    -    int mq_unlink( const char *mqName );
    +    int mq_unlink(const char *mqName);
     

    @@ -1481,11 +1490,11 @@ closed.

    Input Parameters:

      -
    • mqName. Name of the message queue +
    • mqName. Name of the message queue

    -Returned Values: None. +Returned Value: None.

    Assumptions/Limitations:

    @@ -1502,8 +1511,7 @@ interface of the same name.

    Description: - This function adds the specified message, msg, - to the message queue, mqdes. + This function adds the specified message, msg, to the message queue, mqdes. The msglen parameter specifies the length of the message in bytes pointed to by msg. This length must not exceed the maximum message length from the mq_getattr().

    @@ -1523,8 +1531,22 @@ interface of the same name. is not queued and ERROR is returned.

    -NOTE: mq_send() may be called from an interrupt handler. -

    + NOTE: + mq_send() may be called from an interrupt handler. + However, it behaves differently when called from the interrupt level: +

    +
      +
    • + It does not check the size of the queue. + It will always post the message, even if there is already too many messages in queue. + This is because the interrupt handler does not have the option of waiting for the message queue to become non-full. +
    • +
    • + It doesn't allocate new memory (because you cannot allocate memory from an interrup handler). + Instead, there are are pool of pre-allocated message structures that may be used just for sending messages from interrupt handlers. + The number of such pre-allocated messages is a configuration parameter. +
    • +

    Input Parameters:

    @@ -1535,7 +1557,7 @@ interface of the same name.
  • prio. The priority of the message.

- Returned Values: + Returned Value: On success, mq_send() returns 0 (OK); on error, -1 (ERROR) is returned, with errno set to indicate the error: @@ -1618,7 +1640,7 @@ interface of the same name.

  • prio. The priority of the message.
  • - Returned Values: + Returned Value: On success, mq_send() returns 0 (OK); on error, -1 (ERROR) is returned, with errno set to indicate the error: @@ -1689,7 +1711,7 @@ interface of the same name.

  • prio. If not NULL, the location to store message priority.

    - Returned Values:. + Returned Value:. One success, the length of the selected message in bytes is returned. On failure, -1 (ERROR) is returned and the errno is set appropriately:

    @@ -1770,7 +1792,7 @@ interface of the same name.
  • abstime. The absolute time to wait until a timeout is declared.

    - Returned Values:. + Returned Value:. One success, the length of the selected message in bytes is returned. On failure, -1 (ERROR) is returned and the errno is set appropriately:

    @@ -1848,7 +1870,7 @@ interface of the same name.

    - Returned Values: + Returned Value: On success mq_notify() returns 0; on error, -1 is returned, with errno set to indicate the error:

      @@ -1881,10 +1903,10 @@ interface of the same name. another task is waiting for the message queue to become non-empty. This is inconsistent with the POSIX specification which states, "If a process has registered for notification of message arrival at a message queue and - some process is blocked in mq_receive waiting to receive a message - when a message arrives at the queue, the arriving message shall satisfy the - appropriate mq_receive() ... The resulting behavior is as if the - message queue remains empty, and no notification shall be sent." + some process is blocked in mq_receive waiting to receive a message + when a message arrives at the queue, the arriving message will satisfy the + appropriate mq_receive() ... The resulting behavior is as if the + message queue remains empty, and no notification will be sent."

    @@ -1895,8 +1917,8 @@ interface of the same name. Function Prototype:
         #include <mqueue.h>
    -    int mq_setattr( mqd_t mqdes, const struct mq_attr *mqStat,
    -                     struct mq_attr *oldMqStat);
    +    int mq_setattr(mqd_t mqdes, const struct mq_attr *mqStat,
    +                   struct mq_attr *oldMqStat);
     

    @@ -1910,16 +1932,16 @@ would have been returned by mq_getattr()).

    Input Parameters:

      -
    • mqdes. Message queue descriptor -
    • mqStat. New attributes -
    • oldMqState. Old attributes +
    • mqdes. Message queue descriptor +
    • mqStat. New attributes +
    • oldMqState. Old attributes

    -Returned Values: +Returned Value:

      -
    • 0 (OK) if attributes are set successfully, otherwise -1 -(ERROR). +
    • 0 (OK) if attributes are set successfully, otherwise -1 +(ERROR).

    @@ -1934,7 +1956,7 @@ interface of the same name. Function Prototype:

         #include <mqueue.h>
    -    int mq_getattr( mqd_t mqdes, struct mq_attr *mqStat);
    +    int mq_getattr(mqd_t mqdes, struct mq_attr *mqStat);
     

    @@ -1943,22 +1965,22 @@ attributes associated with the specified message queue.

    Input Parameters:

      -
    • mqdes. Message queue descriptor -
    • mqStat. Buffer in which to return attributes. The returned +
    • mqdes. Message queue descriptor +
    • mqStat. Buffer in which to return attributes. The returned attributes include:
        -
      • mq_maxmsg. Max number of messages in queue. -
      • mq_msgsize. Max message size. -
      • mq_flags. Queue flags. -
      • mq_curmsgs. Number of messages currently in queue. +
      • mq_maxmsg. Max number of messages in queue. +
      • mq_msgsize. Max message size. +
      • mq_flags. Queue flags. +
      • mq_curmsgs. Number of messages currently in queue.

    -Returned Values: +Returned Value:

      -
    • 0 (OK) if attributes provided, -1 (ERROR) otherwise. +
    • 0 (OK) if attributes provided, -1 (ERROR) otherwise.

    @@ -2121,7 +2143,7 @@ interface of the same name. Function Prototype:

         #include <semaphore.h>
    -    int sem_init ( sem_t *sem, int pshared, unsigned int value );
    +    int sem_init(sem_t *sem, int pshared, unsigned int value);
     

    @@ -2130,22 +2152,22 @@ sem. Following a successful call to sem_init(), the semaphore may be used in subsequent calls to sem_wait(), sem_post(), and sem_trywait(). The semaphore remains usable until it is destroyed.

    -Only sem itself may be used for performing synchronization. The -result of referring to copies of sem in calls to sem_wait(), -sem_trywait(), sem_post(), and sem_destroy(), is +Only sem itself may be used for performing synchronization. The +result of referring to copies of sem in calls to sem_wait(), +sem_trywait(), sem_post(), and sem_destroy(), is not defined.

    Input Parameters:

      -
    • sem. Semaphore to be initialized -
    • pshared. Process sharing (not used) -
    • value. Semaphore initialization value +
    • sem. Semaphore to be initialized +
    • pshared. Process sharing (not used) +
    • value. Semaphore initialization value

    -Returned Values: +Returned Value:

      -
    • 0 (OK), or -1 (ERROR) if unsuccessful. +
    • 0 (OK), or -1 (ERROR) if unsuccessful.

    @@ -2164,29 +2186,29 @@ Differences from the full POSIX implementation include: Function Prototype:

         #include <semaphore.h>
    -    int sem_destroy ( sem_t *sem );
    +    int sem_destroy(sem_t *sem);
     

    Description: This function is used to destroy the un-named semaphore -indicated by sem. Only a semaphore that was created using -sem_init() may be destroyed using sem_destroy(). The effect -of calling sem_destroy() with a named semaphore is undefined. The -effect of subsequent use of the semaphore sem is undefined until -sem is re-initialized by another call to sem_init(). +indicated by sem. Only a semaphore that was created using +sem_init() may be destroyed using sem_destroy(). The effect +of calling sem_destroy() with a named semaphore is undefined. The +effect of subsequent use of the semaphore sem is undefined until +sem is re-initialized by another call to sem_init().

    The effect of destroying a semaphore upon which other tasks are currently blocked is undefined.

    Input Parameters:

      -
    • sem. Semaphore to be destroyed. +
    • sem. Semaphore to be destroyed.

    -Returned Values: +Returned Value:

      -
    • 0 (OK), or -1 (ERROR) if unsuccessful. +
    • 0 (OK), or -1 (ERROR) if unsuccessful.

    @@ -2201,7 +2223,7 @@ interface of the same name. Function Prototype:

         #include <semaphore.h>
    -    sem_t *sem_open ( const char *name, int oflag, ...);
    +    sem_t *sem_open(const char *name, int oflag, ...);
     

    @@ -2219,35 +2241,35 @@ been no calls to sem_unlink()).

    Input Parameters:

      -
    • name. Semaphore name -
    • oflag. Semaphore creation options. This may one of +
    • name. Semaphore name +
    • oflag. Semaphore creation options. This may one of the following bit settings:
        -
      • oflag = 0: Connect to the semaphore only if it already +
      • oflag = 0: Connect to the semaphore only if it already exists. -
      • oflag = O_CREAT: Connect to the semaphore if it exists, +
      • oflag = O_CREAT: Connect to the semaphore if it exists, otherwise create the semaphore. -
      • oflag = O_CREAT with O_EXCL (O_CREAT|O_EXCL): Create +
      • oflag = O_CREAT with O_EXCL (O_CREAT|O_EXCL): Create a new semaphore unless one of this name already exists.
    • ... Optional parameters. NOTE: When the O_CREAT flag is specified, POSIX requires that a third and fourth parameter be supplied:
        -
      • mode. The mode parameter is of type mode_t. +
      • mode. The mode parameter is of type mode_t. This parameter is required but not used in the present implementation. -
      • value. The value parameter is type unsigned int. The semaphore -is created with an initial value of value. Valid initial values for -semaphores must be less than or equal to SEM_VALUE_MAX (defined in +
      • value. The value parameter is type unsigned int. The semaphore +is created with an initial value of value. Valid initial values for +semaphores must be less than or equal to SEM_VALUE_MAX (defined in include/limits.h).

    -Returned Values: +Returned Value:

      -
    • A pointer to sem_t or -1 (ERROR) if unsuccessful. +
    • A pointer to sem_t or -1 (ERROR) if unsuccessful.

    @@ -2267,7 +2289,7 @@ just a counting semaphore. Function Prototype:

         #include <semaphore.h>
    -    int sem_close ( sem_t *sem );
    +    int sem_close(sem_t *sem);
     

    @@ -2286,13 +2308,13 @@ that another calling task has already locked.

    Input Parameters:

      -
    • sem. Semaphore descriptor +
    • sem. Semaphore descriptor

    -Returned Values: +Returned Value:

      -
    • 0 (OK), or -1 (ERROR) if unsuccessful. +
    • 0 (OK), or -1 (ERROR) if unsuccessful.

    @@ -2312,7 +2334,7 @@ interface of the same name. Function Prototype:

         #include <semaphore.h>
    -    int sem_unlink ( const char *name );
    +    int sem_unlink(const char *name);
     

    @@ -2324,13 +2346,13 @@ sem_close().

    Input Parameters:

      -
    • name. Semaphore name +
    • name. Semaphore name

    -Returned Values: +Returned Value:

      -
    • 0 (OK), or -1 (ERROR) if unsuccessful. +
    • 0 (OK), or -1 (ERROR) if unsuccessful.

    @@ -2358,7 +2380,7 @@ same name should be created after sem_unlink() is called. Function Prototype:

         #include <semaphore.h>
    -    int sem_wait ( sem_t *sem );
    +    int sem_wait(sem_t *sem);
     

    @@ -2369,23 +2391,23 @@ the lock or the call is interrupted by a signal.

    Input Parameters:

      -
    • sem. Semaphore descriptor. +
    • sem. Semaphore descriptor.

    -Returned Values: +Returned Value:

      -
    • 0 (OK), or -1 (ERROR) is unsuccessful +
    • 0 (OK), or -1 (ERROR) is unsuccessful

    -If sem_wait returns -1 (ERROR) then the cause of the failure +If sem_wait returns -1 (ERROR) then the cause of the failure will be indicated by the thread-specific errno. The following lists the possible values for errno:

      -
    • EINVAL: Indicates that the sem input parameter is +
    • EINVAL: Indicates that the sem input parameter is not valid. -
    • EINTR: Indicates that the wait was interrupt by a signal +
    • EINTR: Indicates that the wait was interrupt by a signal received by this task. In this case, the semaphore has not be acquired.

    @@ -2401,7 +2423,7 @@ interface of the same name.

         #include <semaphore.h>
         #include <time.h>
    -    int sem_wait ( sem_t *sem, const struct timespec *abstime);
    +    int sem_wait(sem_t *sem, const struct timespec *abstime);
     

    @@ -2416,20 +2438,20 @@ interface of the same name. Input Parameters:

    • - sem. Semaphore descriptor. + sem. Semaphore descriptor.
    • - abstime. The absolute time to wait until a timeout is declared. + abstime. The absolute time to wait until a timeout is declared.

    -Returned Values: +Returned Value:

      -
    • 0 (OK), or -1 (ERROR) is unsuccessful +
    • 0 (OK), or -1 (ERROR) is unsuccessful

    -If sem_wait returns -1 (ERROR) then the cause of the failure +If sem_wait returns -1 (ERROR) then the cause of the failure will be indicated by the thread-specific errno. The following lists the possible values for errno:

    @@ -2437,7 +2459,7 @@ The following lists the possible values for errno

  • EINVAL: - Indicates that the sem input parameter is not valid or the + Indicates that the sem input parameter is not valid or the thread would have blocked, and the abstime parameter specified a nanoseconds field value less than zero or greater than or equal to 1000 million. @@ -2469,7 +2491,7 @@ The following lists the possible values for errnoFunction Prototype:
         #include <semaphore.h>
    -    int sem_trywait ( sem_t *sem );
    +    int sem_trywait(sem_t *sem);
     

    @@ -2479,22 +2501,22 @@ returns without blocking.

    Input Parameters:

      -
    • sem. The semaphore descriptor +
    • sem. The semaphore descriptor

    -Returned Values: +Returned Value:

      -
    • 0 (OK) or -1 (ERROR) if unsuccessful +
    • 0 (OK) or -1 (ERROR) if unsuccessful
    -If sem_wait returns -1 (ERROR) then the cause of the failure +If sem_wait returns -1 (ERROR) then the cause of the failure will be indicated by the thread-specific
    errno. The following lists the possible values for errno:

      -
    • EINVAL: Indicates that the sem input parameter is +
    • EINVAL: Indicates that the sem input parameter is not valid. -
    • EAGAIN: Indicates that the semaphore was not acquired. +
    • EAGAIN: Indicates that the semaphore was not acquired.

    @@ -2510,13 +2532,13 @@ interface of the same name. Function Prototype:

         #include <semaphore.h>
    -    int sem_post ( sem_t *sem );
    +    int sem_post(sem_t *sem);
     

    Description: When a task has finished with a semaphore, it will call sem_post(). This function unlocks the semaphore referenced -by sem by performing the semaphore unlock operation. +by sem by performing the semaphore unlock operation.

    If the semaphore value resulting from this operation is positive, then no tasks were blocked waiting for the semaphore to become unlocked; @@ -2524,19 +2546,19 @@ The semaphore value is simply incremented.

    If the value of the semaphore resulting from this operation is zero, then on of the tasks blocked waiting for the semaphore will be allowed to -return successfully from its call to sem_wait(). +return successfully from its call to sem_wait().

    -NOTE: sem_post() may be called from an interrupt handler. +NOTE: sem_post() may be called from an interrupt handler.

    Input Parameters:

      -
    • sem. Semaphore descriptor +
    • sem. Semaphore descriptor

    -Returned Values: +Returned Value:

      -
    • 0 (OK) or -1 (ERROR) if unsuccessful. +
    • 0 (OK) or -1 (ERROR) if unsuccessful.

    @@ -2553,7 +2575,7 @@ interface of the same name. Function Prototype:

         #include <semaphore.h>
    -    int sem_getvalue ( sem_t *sem, int *sval );
    +    int sem_getvalue(sem_t *sem, int *sval);
     

    @@ -2570,14 +2592,14 @@ number of tasks waiting for the semaphore.

    Input Parameters:

      -
    • sem. Semaphore descriptor -
    • sval. Buffer by which the value is returned +
    • sem. Semaphore descriptor +
    • sval. Buffer by which the value is returned

    -Returned Values: +Returned Value:

      -
    • 0 (OK) or -1 (ERROR) if unsuccessful. +
    • 0 (OK) or -1 (ERROR) if unsuccessful.

    @@ -2618,7 +2640,7 @@ interface of the same name. Function Prototype:

         #include <wdog.h>
    -    WDOG_ID wd_create (void);
    +    WDOG_ID wd_create(void);
     

    @@ -2627,7 +2649,7 @@ by allocating the appropriate resources for the watchdog.

    Input Parameters: None.

    -Returned Values: +Returned Value:

    • Pointer to watchdog that may be used as a handle in subsequent NuttX calls (i.e., the watchdog ID), or NULL if insufficient resources @@ -2656,7 +2678,7 @@ initialization time). Function Prototype:
           #include <wdog.h>
      -    int wd_delete (WDOG_ID wdog);
      +    int wd_delete(WDOG_ID wdog);
       

      @@ -2666,12 +2688,12 @@ has been started.

      Input Parameters:

        -
      • wdog. The watchdog ID to delete. This is actually a +
      • wdog. The watchdog ID to delete. This is actually a pointer to a watchdog structure.

      -Returned Values: +Returned Value:

      • OK or ERROR
      @@ -2700,8 +2722,8 @@ before deallocating it (i.e., never returns ERROR). Function Prototype:
           #include <wdog.h>
      -    int wd_start( WDOG_ID wdog, int delay, wdentry_t wdentry,
      -                     intt argc, ....);
      +    int wd_start(WDOG_ID wdog, int delay, wdentry_t wdentry,
      +                 int argc, ....);
       

      @@ -2720,15 +2742,15 @@ wd_start() on a given watchdog ID has any effect.

      Input Parameters:

        -
      • wdog. Watchdog ID -
      • delay. Delay count in clock ticks -
      • wdentry. Function to call on timeout -
      • argc. The number of uint32_t parameters to pass to wdentry. -
      • .... uint32_t size parameters to pass to wdentry +
      • wdog. Watchdog ID +
      • delay. Delay count in clock ticks +
      • wdentry. Function to call on timeout +
      • argc. The number of uint32_t parameters to pass to wdentry. +
      • .... uint32_t size parameters to pass to wdentry

      -Returned Values: +Returned Value:

      • OK or ERROR
      @@ -2757,7 +2779,7 @@ number of parameters is determined by Function Prototype:
           #include <wdog.h>
      -    int wd_cancel (WDOG_ID wdog);
      +    int wd_cancel(WDOG_ID wdog);
       

      @@ -2767,11 +2789,11 @@ level.

      Input Parameters:

        -
      • wdog. ID of the watchdog to cancel. +
      • wdog. ID of the watchdog to cancel.

      -Returned Values: +Returned Value:

      • OK or ERROR
      @@ -2852,10 +2874,10 @@ VxWorks provides the following comparable interface:
    • parm.

    - Returned Values: + Returned Value:

    - If successful, the clock_settime() function will return zero (OK). + If successful, the clock_settime() function will return zero (OK). Otherwise, an non-zero error number will be returned to indicate the error:

      @@ -2880,10 +2902,10 @@ VxWorks provides the following comparable interface:
    • parm.

    - Returned Values: + Returned Value:

    - If successful, the clock_gettime() function will return zero (OK). + If successful, the clock_gettime() function will return zero (OK). Otherwise, an non-zero error number will be returned to indicate the error:

      @@ -2908,10 +2930,10 @@ VxWorks provides the following comparable interface:
    • parm.

    - Returned Values: + Returned Value:

    - If successful, the clock_getres() function will return zero (OK). + If successful, the clock_getres() function will return zero (OK). Otherwise, an non-zero error number will be returned to indicate the error:

      @@ -2936,10 +2958,10 @@ VxWorks provides the following comparable interface:
    • parm.

    - Returned Values: + Returned Value:

    - If successful, the mktime() function will return zero (OK). + If successful, the mktime() function will return zero (OK). Otherwise, an non-zero error number will be returned to indicate the error:

      @@ -2968,10 +2990,10 @@ VxWorks provides the following comparable interface:

    - Returned Values: + Returned Value:

    - If successful, the gmtime() function will return the pointer to a statically + If successful, the gmtime() function will return the pointer to a statically defined instance of struct tim. Otherwise, a NULL will be returned to indicate the error:

    @@ -3008,10 +3030,10 @@ VxWorks provides the following comparable interface: A user-provided buffer to receive the converted time structure.

    - Returned Values: + Returned Value:

    - If successful, the gmtime_r() function will return the pointer, result, + If successful, the gmtime_r() function will return the pointer, result, provided by the caller. Otherwise, a NULL will be returned to indicate the error:

    @@ -3055,7 +3077,7 @@ VxWorks provides the following comparable interface:

    Each implementation defines a set of clocks that can be used as timing bases - for per-thread timers. All implementations shall support a clock_id of + for per-thread timers. All implementations will support a clock_id of CLOCK_REALTIME.

    @@ -3069,7 +3091,7 @@ VxWorks provides the following comparable interface:

  • timerid. The pre-thread timer created by the call to timer_create().
  • - Returned Values: + Returned Value:

    If the call succeeds, timer_create() will return 0 (OK) and update the @@ -3119,11 +3141,11 @@ VxWorks provides the following comparable interface: The pre-thread timer, previously created by the call to timer_create(), to be deleted.

    - Returned Values: + Returned Value:

    - If successful, the timer_delete() function will return zero (OK). - Otherwise, the function will return a value of -1 (ERROR) and set + If successful, the timer_delete() function will return zero (OK). + Otherwise, the function will return a value of -1 (ERROR) and set errno to indicate the error:

      @@ -3197,11 +3219,11 @@ VxWorks provides the following comparable interface:
    • ovalue. A location in which to return the time remaining from the previous timer setting (ignored).

    - Returned Values: + Returned Value:

    - If the timer_gettime() succeeds, a value of 0 (OK) will be returned. - If an error occurs, the value -1 (ERROR) will be returned, and + If the timer_gettime() succeeds, a value of 0 (OK) will be returned. + If an error occurs, the value -1 (ERROR) will be returned, and errno set to indicate the error.

      @@ -3248,10 +3270,10 @@ VxWorks provides the following comparable interface: timer_create(), whose remaining count will be returned.

    - Returned Values: + Returned Value:

    - If successful, the timer_gettime() function will return zero (OK). + If successful, the timer_gettime() function will return zero (OK). Otherwise, an non-zero error number will be returned to indicate the error:

      @@ -3302,7 +3324,7 @@ VxWorks provides the following comparable interface: timer_create(), whose overrun count will be returned.

    - Returned Values: + Returned Value: If the timer_getoverrun() function succeeds, it will return the timer expiration overrun count as explained above. timer_getoverrun() will fail if:

    @@ -3348,7 +3370,7 @@ interface of the same name.
  • tzp. A reference to the timezone -- IGNORED.
  • - Returned Values: + Returned Value: See clock_gettime().

    @@ -3414,13 +3436,13 @@ by set such that all signals are excluded.

    Input Parameters:

      -
    • set. Signal set to initialize. +
    • set. Signal set to initialize.

    -Returned Values: +Returned Value:

      -
    • 0 (OK), or -1 (ERROR) if the signal set cannot be initialized. +
    • 0 (OK), or -1 (ERROR) if the signal set cannot be initialized.

    @@ -3444,13 +3466,13 @@ by set such that all signals are included.

    Input Parameters:

      -
    • set. Signal set to initialize +
    • set. Signal set to initialize

    -Returned Values: +Returned Value:

      -
    • 0 (OK), or -1 (ERROR) if the signal set cannot be initialized. +
    • 0 (OK), or -1 (ERROR) if the signal set cannot be initialized.

    @@ -3474,14 +3496,14 @@ signo to the signal set specified by set.

    Input Parameters:

      -
    • set. Signal set to add signal to -
    • signo. Signal to add +
    • set. Signal set to add signal to +
    • signo. Signal to add

    -Returned Values: +Returned Value:

      -
    • 0 (OK), or -1 (ERROR) if the signal number is invalid. +
    • 0 (OK), or -1 (ERROR) if the signal number is invalid.

    @@ -3505,14 +3527,14 @@ by signo from the signal set specified by set.

    Input Parameters:

      -
    • set. Signal set to delete the signal from -
    • signo. Signal to delete +
    • set. Signal set to delete the signal from +
    • signo. Signal to delete

    -Returned Values: +Returned Value:

      -
    • 0 (OK), or -1 (ERROR) if the signal number is invalid. +
    • 0 (OK), or -1 (ERROR) if the signal number is invalid.

    @@ -3536,16 +3558,16 @@ by signo is a member of the set specified by set.

    Input Parameters:

      -
    • set. Signal set to test -
    • signo. Signal to test for +
    • set. Signal set to test +
    • signo. Signal to test for

    -Returned Values: +Returned Value:

    • 1 (TRUE), if the specified signal is a member of the set,
    • 0 (OK or FALSE), if it is not, or -
    • -1 (ERROR) if the signal number is invalid. +
    • -1 (ERROR) if the signal number is invalid.

    @@ -3560,8 +3582,8 @@ interface of the same name. Function Prototype:

         #include <signal.h>
    -    int sigaction( int signo, const struct sigaction *act,
    -                   struct sigaction *oact );
    +    int sigaction(int signo, const struct sigaction *act,
    +                  struct sigaction *oact);
     

    @@ -3572,12 +3594,12 @@ signal. The structure sigaction, used to describe an action to be taken, is defined to include the following members:

      -
    • sa_u.sa_handler. A pointer to a signal-catching function. -
    • sa_u.sa_sigaction. An alternative form for the signal catching +
    • sa_u.sa_handler. A pointer to a signal-catching function. +
    • sa_u.sa_sigaction. An alternative form for the signal catching function. -
    • sa_mask. Additional set of signals to be blocked during +
    • sa_mask. Additional set of signals to be blocked during execution of the signal-catching function. -
    • sa_flags: Special flags to affect behavior of a signal. +
    • sa_flags: Special flags to affect behavior of a signal.

    If the argument act is not NULL, it points to a structure specifying the @@ -3603,15 +3625,15 @@ sigaction().

    Input Parameters:

      -
    • sig. Signal of interest -
    • act. Location of new handler -
    • oact. Location to store old handler +
    • sig. Signal of interest +
    • act. Location of new handler +
    • oact. Location to store old handler

    -Returned Values: +Returned Value:

      -
    • 0 (OK), or -1 (ERROR) if the signal number is invalid. +
    • 0 (OK), or -1 (ERROR) if the signal number is invalid.

    @@ -3650,25 +3672,25 @@ If sigprocmask() fails, the signal mask of the task is not changed.

    Input Parameters:

      -
    • how. How the signal mast will be changed: +
    • how. How the signal mast will be changed:
        -
      • SIG_BLOCK. The resulting set is the union of the -current set and the signal set pointed to by the set input parameter. -
      • SIG_UNBLOCK. The resulting set is the intersection +
      • SIG_BLOCK. The resulting set is the union of the +current set and the signal set pointed to by the set input parameter. +
      • SIG_UNBLOCK. The resulting set is the intersection of the current set and the complement of the signal set pointed -to by the set input parameter. -
      • SIG_SETMASK. The resulting set is the signal set -pointed to by the set input parameter. +to by the set input parameter. +
      • SIG_SETMASK. The resulting set is the signal set +pointed to by the set input parameter.
      -
    • set. Location of the new signal mask -
    • oset. Location to store the old signal mask +
    • set. Location of the new signal mask +
    • oset. Location to store the old signal mask

    -Returned Values: +Returned Value:

      -
    • 0 (OK), or -1 (ERROR) if how is invalid. +
    • 0 (OK), or -1 (ERROR) if how is invalid.

    @@ -3683,7 +3705,7 @@ interface of the same name. Function Prototype:

         #include <signal.h>
    -    int sigpending( sigset_t *set );
    +    int sigpending(sigset_t *set);
     

    @@ -3700,13 +3722,13 @@ is delivered more than once."

    Input Parameters:

      -
    • set. The location to return the pending signal set. +
    • set. The location to return the pending signal set.

    -Returned Values: +Returned Value:

      -
    • 0 (OK) or -1 (ERROR) +
    • 0 (OK) or -1 (ERROR)

    @@ -3721,7 +3743,7 @@ interface of the same name. Function Prototype:

         #include <signal.h>
    -    int sigsuspend( const sigset_t *set );
    +    int sigsuspend(const sigset_t *set);
     

    @@ -3739,14 +3761,14 @@ resources (a very bad idea).

    Input Parameters:

      -
    • set. The value of the signal mask to use while +
    • set. The value of the signal mask to use while suspended.

    -Returned Values: +Returned Value:

      -
    • -1 (ERROR) always +
    • -1 (ERROR) always

    @@ -3778,15 +3800,15 @@ with a NULL timeout parameter. (see below).

    Input Parameters:

      -
    • set. The set of pending signals to wait for. -
    • info. The returned signal values +
    • set. The set of pending signals to wait for. +
    • info. The returned signal values

    -Returned Values: +Returned Value:

    • Signal number that cause the wait to be terminated, otherwise --1 (ERROR) is returned. +-1 (ERROR) is returned.

    @@ -3801,8 +3823,8 @@ interface of the same name. Function Prototype:

         #include <signal.h>
    -    int sigtimedwait( const sigset_t *set, struct siginfo *info,
    -                      const struct timespec *timeout );
    +    int sigtimedwait(const sigset_t *set, struct siginfo *info,
    +                     const struct timespec *timeout);
     

    @@ -3821,26 +3843,26 @@ in the si_code member. The content of si_value is only meaningful if the signal was generated by sigqueue(). The following values for si_code are defined in signal.h:

      -
    • SI_USER. Signal sent from kill, raise, or abort -
    • SI_QUEUE. Signal sent from sigqueue -
    • SI_TIMER. Signal is result of timer expiration -
    • SI_ASYNCIO. Signal is the result of asynchronous IO completion -
    • SI_MESGQ. Signal generated by arrival of a message on an empty message queue. +
    • SI_USER. Signal sent from kill, raise, or abort +
    • SI_QUEUE. Signal sent from sigqueue +
    • SI_TIMER. Signal is result of timer expiration +
    • SI_ASYNCIO. Signal is the result of asynchronous IO completion +
    • SI_MESGQ. Signal generated by arrival of a message on an empty message queue.

    Input Parameters:

      -
    • set. The set of pending signals to wait for. -
    • info. The returned signal values -
    • timeout. The amount of time to wait +
    • set. The set of pending signals to wait for. +
    • info. The returned signal values +
    • timeout. The amount of time to wait

    -Returned Values: +Returned Value:

    • Signal number that cause the wait to be terminated, otherwise --1 (ERROR) is returned. +-1 (ERROR) is returned.

    @@ -3854,7 +3876,7 @@ Differences from the POSIX interface include:

  • No mechanism to return cause of ERROR. (It can be inferred from si_code in a non-standard way).
  • POSIX states that "If no signal is pending at the time of the -call, the calling task shall be suspended until one or more signals +call, the calling task will be suspended until one or more signals in set become pending or until it is interrupted by an unblocked, caught signal." The present implementation does not require that the unblocked signal be caught; the task will be resumed even if @@ -3884,17 +3906,17 @@ is delivered more than once."

    Input Parameters:

      -
    • tid. ID of the task to receive signal -
    • signo. Signal number -
    • value. Value to pass to task with signal +
    • tid. ID of the task to receive signal +
    • signo. Signal number +
    • value. Value to pass to task with signal

    -Returned Values: +Returned Value:

    • - On success (at least one signal was sent), zero (OK) is returned. - On error, -1 (ERROR) is returned, and errno is set appropriately. + On success (at least one signal was sent), zero (OK) is returned. + On error, -1 (ERROR) is returned, and errno is set appropriately.
      • EGAIN. The limit of signals which may be queued has been reached.
      • EINVAL. signo was invalid.
      • @@ -3944,17 +3966,17 @@ be sent.

        Input Parameters:

          -
        • pid. The id of the task to receive the signal. +
        • pid. The id of the task to receive the signal. The POSIX kill() specification encodes process group information as zero and negative pid values. Only positive, non-zero values of pid are supported by this implementation. ID of the task to receive signal -
        • signo. The signal number to send. +
        • signo. The signal number to send. If signo is zero, no signal is sent, but all error checking is performed.

        - Returned Values: + Returned Value:

        • OK or ERROR
        @@ -4064,9 +4086,6 @@ be sent.
      • pthread_attr_setscope. get and set the contentionscope attribute.
      • pthread_attr_setstack. get and set stack attributes.
      • pthread_attr_setstackaddr. get and set the stackaddr attribute.
      • -
      • pthread_barrier_destroy. destroy and initialize a barrier object.
      • -
      • pthread_barrier_init. destroy and initialize a barrier object.
      • -
      • pthread_barrier_wait. synchronize at a barrier.
      • pthread_cleanup_pop. establish cancellation handlers.
      • pthread_cleanup_push. establish cancellation handlers.
      • pthread_condattr_getclock. set the clock selection condition variable attribute.
      • @@ -4124,10 +4143,10 @@ for all of the individual attributes used by the implementation.
      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_attr_init() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_attr_init() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -4156,10 +4175,10 @@ An attributes object can be deleted when it is no longer needed.
      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_attr_destroy() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_attr_destroy() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -4187,10 +4206,10 @@ interface of the same name.
      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_attr_setschedpolicy() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_attr_setschedpolicy() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -4218,10 +4237,10 @@ interface of the same name.
      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_attr_getschedpolicy() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_attr_getschedpolicy() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -4237,9 +4256,9 @@ interface of the same name. Function Prototype:

        -   #include <pthread.h>
        +    #include <pthread.h>
             int pthread_attr_setschedparam(pthread_attr_t *attr,
        -				      const struct sched_param *param);
        +                                   const struct sched_param *param);
         

        Description: @@ -4250,10 +4269,10 @@ interface of the same name.

      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_attr_getschedpolicy() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_attr_getschedpolicy() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -4269,9 +4288,9 @@ interface of the same name. Function Prototype:

        -   #include <pthread.h>
        -     int pthread_attr_getschedparam(pthread_attr_t *attr,
        -				      struct sched_param *param);
        +    #include <pthread.h>
        +    int pthread_attr_getschedparam(pthread_attr_t *attr,
        +                                   struct sched_param *param);
         

        Description: @@ -4282,10 +4301,10 @@ interface of the same name.

      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_attr_getschedparam() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_attr_getschedparam() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -4303,7 +4322,7 @@ interface of the same name.
            #include <pthread.h>
             int pthread_attr_setinheritsched(pthread_attr_t *attr,
        -					int inheritsched);
        +                                     int inheritsched);
         

        Description: @@ -4314,10 +4333,10 @@ interface of the same name.

      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_attr_setinheritsched() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_attr_setinheritsched() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -4335,7 +4354,7 @@ interface of the same name.
            #include <pthread.h>
              int pthread_attr_getinheritsched(const pthread_attr_t *attr,
        -					int *inheritsched);
        +                                      int *inheritsched);
         

        Description: @@ -4346,10 +4365,10 @@ interface of the same name.

      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_attr_getinheritsched() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_attr_getinheritsched() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -4365,7 +4384,7 @@ interface of the same name. Function Prototype:

        -   #include <pthread.h>
        +    #include <pthread.h>
             int pthread_attr_setstacksize(pthread_attr_t *attr, long stacksize);
         

        @@ -4377,10 +4396,10 @@ interface of the same name.

      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_attr_setstacksize() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_attr_setstacksize() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -4397,7 +4416,7 @@ interface of the same name.

             #include <pthread.h>
        -   int pthread_attr_getstacksize(pthread_attr_t *attr, long *stackaddr);
        +    int pthread_attr_getstacksize(pthread_attr_t *attr, long *stackaddr);
         

        Description: @@ -4408,10 +4427,10 @@ interface of the same name.

      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_attr_getstacksize() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_attr_getstacksize() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -4429,8 +4448,8 @@ interface of the same name.
             #include <pthread.h>
             int pthread_create(pthread_t *thread, pthread_attr_t *attr,
        -			  pthread_startroutine_t startRoutine,
        -			  pthread_addr_t arg);
        +                       pthread_startroutine_t startRoutine,
        +                       pthread_addr_t arg);
         

        Description: @@ -4447,10 +4466,10 @@ specify details about the kind of thread being created.

      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_create() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_create() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -4480,10 +4499,10 @@ return value and completion status will not be requested.
      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_detach() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_detach() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -4512,10 +4531,10 @@ A thread may terminate it's own execution.
      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_exit() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_exit() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -4537,10 +4556,10 @@ interface of the same name.

        Description: -

        The pthread_cancel() function shall request that thread +

        The pthread_cancel() function will request that thread be canceled. The target thread's cancelability state determines when the cancellation takes effect. When the -cancellation is acted on, thread shall be terminated.

        +cancellation is acted on, thread will be terminated.

        When cancelability is disabled, all cancels are held pending in the target thread until the thread changes the cancelability. @@ -4555,17 +4574,17 @@ immediately (when enable), interrupting the thread with its processing.

        Input Parameters:

          -
        • thread. +
        • thread. Identifies the thread to be canceled.

        -Returned Values: +Returned Value:

        -If successful, the pthread_cancel() function will return zero (OK). +If successful, the pthread_cancel() function will return zero (OK). Otherwise, an error number will be returned to indicate the error:

          -
        • ESRCH. +
        • ESRCH. No thread could be found corresponding to that specified by the given thread ID.
        Assumptions/Limitations: @@ -4573,7 +4592,7 @@ No thread could be found corresponding to that specified by the given thread ID. POSIX Compatibility: Comparable to the POSIX interface of the same name. Except:

          -
        • The thread-specific data destructor functions shall be called for thread. +
        • The thread-specific data destructor functions will be called for thread. However, these destructors are not currently supported.
        • Cancellation types are not supported. The thread will be canceled at the time that pthread_cancel() is called or, if cancellation is disabled, at @@ -4592,7 +4611,7 @@ the time when cancellation is re-enabled.
        • Description: -

          The pthread_setcancelstate() function atomically +

          The pthread_setcancelstate() function atomically sets both the calling thread's cancelability state to the indicated state and returns the previous cancelability state at the location referenced by oldstate. @@ -4604,19 +4623,19 @@ cancellation state is set to PTHREAD_CANCEL_ENABLE.

          Input Parameters:

            -
          • state +
          • state New cancellation state. One of PTHREAD_CANCEL_ENABLE or PTHREAD_CANCEL_DISABLE.<.li> -
          • oldstate. +
          • oldstate. Location to return the previous cancellation state.

          -Returned Values: +Returned Value:

          -If successful, the pthread_setcancelstate() function will return -zero (OK). Otherwise, an error number will be returned to indicate the error: +If successful, the pthread_setcancelstate() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

            -
          • ESRCH. +
          • ESRCH. No thread could be found corresponding to that specified by the given thread ID.
          Assumptions/Limitations: @@ -4641,10 +4660,10 @@ interface of the same name.
        • To be provided.

        -Returned Values: +Returned Value:

        -If successful, the pthread_setcancelstate() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_setcancelstate() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

          @@ -4674,10 +4693,10 @@ the return value of the thread.
        • To be provided.

        -Returned Values: +Returned Value:

        -If successful, the pthread_join() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_join() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

          @@ -4707,10 +4726,10 @@ made available.
        • To be provided.

        -Returned Values: +Returned Value:

        -If successful, the pthread_yield() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_yield() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

          @@ -4739,10 +4758,10 @@ A thread may obtain a copy of its own thread handle.
        • To be provided.

        -Returned Values: +Returned Value:

        -If successful, the pthread_self() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_self() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

          @@ -4806,7 +4825,7 @@ interface of the same name.

        - Returned Values: + Returned Value: 0 (OK) if successful. Otherwise, the error code ESRCH if the value specified by thread does not refer to an existing thread. @@ -4871,11 +4890,11 @@ interface of the same name.

      - Returned Values: + Returned Value:

      - If successful, the pthread_setschedparam() function will return - zero (OK). Otherwise, an error number will be + If successful, the pthread_setschedparam() function will return + zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -4917,7 +4936,7 @@ interface of the same name.

             #include <pthread.h>
        -    int pthread_key_create( pthread_key_t *key, void (*destructor)(void*) )
        +    int pthread_key_create(pthread_key_t *key, void (*destructor)(void*))
         

        Description: @@ -4925,38 +4944,38 @@ interface of the same name. This function creates a thread-specific data key visible to all threads in the system. Although the same key value may be used by different threads, the values bound to -the key by pthread_setspecific() are maintained on a +the key by pthread_setspecific() are maintained on a per-thread basis and persist for the life of the calling thread.

        -Upon key creation, the value NULL will be associated with +Upon key creation, the value NULL will be associated with the new key in all active threads. Upon thread -creation, the value NULL will be associated with all +creation, the value NULL will be associated with all defined keys in the new thread.

        Input Parameters:

          -
        • key is a pointer to the key to create. -
        • destructor is an optional destructor() function that may +
        • key is a pointer to the key to create. +
        • destructor is an optional destructor() function that may be associated with each key that is invoked when a thread exits. However, this argument is ignored in the current implementation.

        -Returned Values: +Returned Value:

        -If successful, the pthread_key_create() function will -store the newly created key value at *key and return -zero (OK). Otherwise, an error number will be +If successful, the pthread_key_create() function will +store the newly created key value at *key and return +zero (OK). Otherwise, an error number will be returned to indicate the error:

          -
        • EAGAIN. The system lacked sufficient resources +
        • EAGAIN. The system lacked sufficient resources to create another thread-specific data key, or the system-imposed limit on the total number of keys -per task {PTHREAD_KEYS_MAX} has been exceeded -
        • ENONMEM Insufficient memory exists to create the key. +per task {PTHREAD_KEYS_MAX} has been exceeded +
        • ENONMEM Insufficient memory exists to create the key.
        Assumptions/Limitations:

        @@ -4972,39 +4991,39 @@ interface of the same name.

             #include <pthread.h>
        -    int pthread_setspecific( pthread_key_t key, void *value )
        +    int pthread_setspecific(pthread_key_t key, void *value)
         

        Description:

        -The pthread_setspecific() function associates a thread- +The pthread_setspecific() function associates a thread- specific value with a key obtained via a previous call -to pthread_key_create(). Different threads may bind +to pthread_key_create(). Different threads may bind different values to the same key. These values are typically pointers to blocks of dynamically allocated memory that have been reserved for use by the calling thread.

        -The effect of calling pthread_setspecific() with a key value -not obtained from pthread_key_create() or after a key has been -deleted with pthread_key_delete() is undefined. +The effect of calling pthread_setspecific() with a key value +not obtained from pthread_key_create() or after a key has been +deleted with pthread_key_delete() is undefined.

        Input Parameters:

          -
        • key. The data key to set the binding for. -
        • value. The value to bind to the key. +
        • key. The data key to set the binding for. +
        • value. The value to bind to the key.

        -Returned Values: +Returned Value:

        -If successful, pthread_setspecific() will return zero (OK). +If successful, pthread_setspecific() will return zero (OK). Otherwise, an error number will be returned:

          -
        • ENOMEM. Insufficient memory exists to associate the value +
        • ENOMEM. Insufficient memory exists to associate the value with the key. -
        • EINVAL. The key value is invalid. +
        • EINVAL. The key value is invalid.

        Assumptions/Limitations: @@ -5022,31 +5041,31 @@ destructor function.

             #include <pthread.h>
        -    void *pthread_getspecific( pthread_key_t key )
        +    void *pthread_getspecific(pthread_key_t key)
         

        Description:

        -The pthread_getspecific() function returns the value +The pthread_getspecific() function returns the value currently bound to the specified key on behalf of the calling thread.

        -The effect of calling pthread_getspecific() with a key value -not obtained from pthread_key_create() or after a key has been -deleted with pthread_key_delete() is undefined. +The effect of calling pthread_getspecific() with a key value +not obtained from pthread_key_create() or after a key has been +deleted with pthread_key_delete() is undefined.

        Input Parameters:

          -
        • key. The data key to get the binding for. +
        • key. The data key to get the binding for.

        -Returned Values: +Returned Value:

        -The function pthread_getspecific() returns the thread- +The function pthread_getspecific() returns the thread- specific data associated with the given key. If no thread specific data is associated with the key, then -the value NULL is returned. +the value NULL is returned.

        Assumptions/Limitations:

        @@ -5063,25 +5082,25 @@ destructor function.

             #include <pthread.h>
        -    int pthread_key_delete( pthread_key_t key )
        +    int pthread_key_delete(pthread_key_t key)
         

        Description:

        This POSIX function should delete a thread-specific data -key previously returned by pthread_key_create(). However, +key previously returned by pthread_key_create(). However, this function does nothing in the present implementation.

        Input Parameters:

          -
        • key. The key to delete +
        • key. The key to delete

        -Returned Values: +Returned Value:

          -
        • Always returns EINVAL. +
        • Always returns EINVAL.

        Assumptions/Limitations: @@ -5106,10 +5125,10 @@ interface of the same name.

      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_mutexattr_init() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_mutexattr_init() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5137,10 +5156,10 @@ interface of the same name.
      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_mutexattr_destroy() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_mutexattr_destroy() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5158,7 +5177,7 @@ interface of the same name.
             #include <pthread.h>
             int pthread_mutexattr_getpshared(pthread_mutexattr_t *attr,
        -					int *pshared);
        +                                     int *pshared);
         

        Description: @@ -5169,10 +5188,10 @@ interface of the same name.

      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_mutexattr_getpshared() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_mutexattr_getpshared() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5190,7 +5209,7 @@ interface of the same name.
             #include <pthread.h>
            int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr,
        -					int pshared);
        +                                    int pshared);
         

        Description: @@ -5201,10 +5220,10 @@ interface of the same name.

      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_mutexattr_setpshared() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_mutexattr_setpshared() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5237,10 +5256,10 @@ interface of the same name. for a description of possible mutex types that may be returned.

      -Returned Values: +Returned Value:

      -If successful, the pthread_mutexattr_settype() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_mutexattr_settype() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5291,10 +5310,10 @@ returned to indicate the error:

      -Returned Values: +Returned Value:

      -If successful, the pthread_mutexattr_settype() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_mutexattr_settype() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5311,7 +5330,7 @@ returned to indicate the error:
             #include <pthread.h>
             int pthread_mutex_init(pthread_mutex_t *mutex,
        -			      pthread_mutexattr_t *attr);
        +                           pthread_mutexattr_t *attr);
         

        Description: @@ -5322,10 +5341,10 @@ returned to indicate the error:

      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_mutex_init() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_mutex_init() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5353,10 +5372,10 @@ interface of the same name.
      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_mutex_destroy() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_mutex_destroy() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5419,9 +5438,9 @@ interface of the same name.
      • mutex. A reference to the mutex to be locked.

      -Returned Values: +Returned Value:

      -If successful, the pthread_mutex_lock() function will return zero (OK). +If successful, the pthread_mutex_lock() function will return zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5446,7 +5465,7 @@ interface of the same name. The function pthread_mutex_trylock() is identical to pthread_mutex_lock() except that if the mutex object referenced by mutex is currently locked (by any thread, including the current thread), the call returns immediately - with the errno EBUSY. + with the errno EBUSY.

        If a signal is delivered to a thread waiting for a mutex, upon return from the signal handler the thread resumes waiting for the mutex as if it was @@ -5459,9 +5478,9 @@ interface of the same name.

      • mutex. A reference to the mutex to be locked.

      -Returned Values: +Returned Value:

      -If successful, the pthread_mutex_trylock() function will return zero (OK). +If successful, the pthread_mutex_trylock() function will return zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5489,7 +5508,7 @@ interface of the same name. mutex's type attribute. If there are threads blocked on the mutex object referenced by mutex when pthread_mutex_unlock() is called, resulting in the mutex becoming available, the scheduling policy is used to determine - which thread shall acquire the mutex. (In the case of PTHREAD_MUTEX_RECURSIVE + which thread will acquire the mutex. (In the case of PTHREAD_MUTEX_RECURSIVE mutexes, the mutex becomes available when the count reaches zero and the calling thread no longer has any locks on this mutex).

        @@ -5504,10 +5523,10 @@ interface of the same name.
      • mutex.

      -Returned Values: +Returned Value:

      -If successful, the pthread_mutex_unlock() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_mutex_unlock() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5536,10 +5555,10 @@ interface of the same name.
      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_condattr_init() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_condattr_init() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5567,10 +5586,10 @@ interface of the same name.
      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_condattr_destroy() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_condattr_destroy() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5598,10 +5617,10 @@ interface of the same name.
      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_cond_init() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_cond_init() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5629,10 +5648,10 @@ interface of the same name.
      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_cond_destroy() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_cond_destroy() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5660,10 +5679,10 @@ interface of the same name.
      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_cond_broadcast() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_cond_broadcast() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5691,10 +5710,10 @@ interface of the same name.
      • To be provided.

      -Returned Values: +Returned Value:

      -If successful, the pthread_cond_signal() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_cond_signal() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5722,10 +5741,10 @@ interface of the same name.
      • To be provided.

      - Returned Values: + Returned Value:

      -If successful, the pthread_cond_wait() function will return -zero (OK). Otherwise, an error number will be +If successful, the pthread_cond_wait() function will return +zero (OK). Otherwise, an error number will be returned to indicate the error:

        @@ -5743,7 +5762,7 @@ interface of the same name.
             #include <pthread.h>
             int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
        -				  const struct timespec *abstime);
        +                               const struct timespec *abstime);
         

        Description: @@ -5756,7 +5775,7 @@ interface of the same name.

      • To be provided.

      - Returned Values: + Returned Value:

      If successful, the pthread_cond_timedwait() function will return @@ -5796,7 +5815,7 @@ interface of the same name.

    - Returned Values: + Returned Value: 0 (OK) on success or EINVAL if attr is invalid.

    @@ -5829,7 +5848,7 @@ interface of the same name.

  • - Returned Values: 0 (OK) on success or EINVAL if attr is invalid. + Returned Value: 0 (OK) on success or EINVAL if attr is invalid.

    Assumptions/Limitations: @@ -5865,7 +5884,7 @@ interface of the same name.

  • pshared. The new value of the pshared attribute.
  • - Returned Values: 0 (OK) on success or EINVAL if either + Returned Value: 0 (OK) on success or EINVAL if either attr is invalid or pshared is not one of PTHREAD_PROCESS_SHARED or PTHREAD_PROCESS_PRIVATE.

    @@ -5898,7 +5917,7 @@ interface of the same name.
  • pshared. The location to stored the current value of the pshared attribute.
  • - Returned Values: 0 (OK) on success or EINVAL if + Returned Value: 0 (OK) on success or EINVAL if either attr or pshared is invalid.

    @@ -5950,7 +5969,7 @@ interface of the same name.

    - Returned Values:0 (OK) on success or on of the following error numbers: + Returned Value:0 (OK) on success or on of the following error numbers:

    • @@ -6003,7 +6022,7 @@ interface of the same name.
    • barrier. The barrier to be destroyed.

    - Returned Values: 0 (OK) on success or on of the following error numbers: + Returned Value: 0 (OK) on success or on of the following error numbers:

    • @@ -6072,7 +6091,7 @@ interface of the same name.
    • barrier. The barrier on which to wait.

    - Returned Values: 0 (OK) on success or EINVAL if the barrier is not valid. + Returned Value: 0 (OK) on success or EINVAL if the barrier is not valid.

    Assumptions/Limitations: @@ -6116,8 +6135,8 @@ interface of the same name.

    - Returned Values: - 0 (OK) on success or EINVAL if either once_control or init_routine are invalid. + Returned Value: + 0 (OK) on success or EINVAL if either once_control or init_routine are invalid.

    Assumptions/Limitations: @@ -6157,7 +6176,7 @@ interface of the same name.

    - Returned Values: + Returned Value:

    On success, the signal was sent and zero is returned. @@ -6232,11 +6251,11 @@ interface of the same name.

    - Returned Values: -

    -

    - 0 (OK) on success or EINVAL if how is invalid. + Returned Value:

    +
      + 0 (OK) on success or EINVAL if how is invalid. +

    Assumptions/Limitations:

    @@ -6314,7 +6333,7 @@ interface of the same name.

    - Returned Values: + Returned Value: The value of the variable (read-only) or NULL on failure.

    @@ -6341,11 +6360,11 @@ interface of the same name.
    • string - name=value string describing the environment setting to add/modify. + name=value string describing the environment setting to add/modify.

    - Returned Values: + Returned Value: Zero on success.

    @@ -6367,7 +6386,7 @@ interface of the same name. None

    - Returned Values: + Returned Value: Zero on success.

    @@ -6405,7 +6424,7 @@ interface of the same name.

    - Returned Values: + Returned Value: Zero on success.

    @@ -6432,7 +6451,7 @@ interface of the same name.

    - Returned Values: + Returned Value: Zero on success.

    @@ -6560,7 +6579,7 @@ interface of the same name.

       #include <poll.h>
    -  int     poll(struct pollfd *fds, nfds_t nfds, int timeout);
    +  int poll(struct pollfd *fds, nfds_t nfds, int timeout);
     

    Description: @@ -6607,7 +6626,7 @@ interface of the same name. timeout.

    - Returned Values: + Returned Value:

    On success, the number of structures that have nonzero revents fields. @@ -6629,11 +6648,11 @@ interface of the same name.

    Function Prototype:

    -
    -  #include <sys/select.h>
    -  int     select(int nfds, FAR fd_set *readfds, FAR fd_set *writefds,
    -                 FAR fd_set *exceptfds, FAR struct timeval *timeout);
    -
    +
      +#include <sys/select.h>
      +int select(int nfds, FAR fd_set *readfds, FAR fd_set *writefds,
      +           FAR fd_set *exceptfds, FAR struct timeval *timeout);
      +

    Description: select() allows a program to monitor multiple file descriptors, waiting @@ -6660,7 +6679,7 @@ interface of the same name.

  • timeout. Return at this time if none of these events of interest occur.
  • - Returned Values: + Returned Value:

    • 0: Timer expired
    • @@ -6802,10 +6821,10 @@ void *memmove(void *dest, const void *src, size_t count);

      Function Prototype:

      -
      -  #include <unistd.h>
      -  int pipe(int filedes[2]);
      -
      +
        +#include <unistd.h>
        +int pipe(int filedes[2]);
        +

      Description:

        @@ -6824,7 +6843,7 @@ void *memmove(void *dest, const void *src, size_t count);

        - Returned Values: + Returned Value:

          0 is returned on success; otherwise, -1 is returned with errno set appropriately. @@ -6836,10 +6855,10 @@ void *memmove(void *dest, const void *src, size_t count);

          Function Prototype:

          -
          -  #include <sys/stat.h>
          -  int mkfifo(FAR const char *pathname, mode_t mode);
          -
          +
            +#include <sys/stat.h>
            +int mkfifo(FAR const char *pathname, mode_t mode);
            +

          Description:

            @@ -6871,7 +6890,7 @@ void *memmove(void *dest, const void *src, size_t count);

          - Returned Values: + Returned Value:

            0 is returned on success; otherwise, -1 is returned with errno set appropriately. @@ -6933,7 +6952,7 @@ struct fat_format_s

          - Returned Values: + Returned Value:

            Zero (OK) on success; @@ -7189,7 +7208,7 @@ FAR void *mmap(FAR void *start, size_t length, int prot, int flags, int fd, off_

          - Returned Values: + Returned Value:

            On success, mmap() returns a pointer to the mapped area. @@ -7246,10 +7265,10 @@ Those socket APIs are discussed in the following paragraphs.

            Function Prototype:

            -
            -  #include <sys/socket.h>
            -  int socket(int domain, int type, int protocol);
            -
            +
              +#include <sys/socket.h>
              +int socket(int domain, int type, int protocol);
              +

            Description: socket() creates an endpoint for communication and returns a descriptor. @@ -7264,7 +7283,7 @@ Those socket APIs are discussed in the following paragraphs.

          • protocol: (see sys/socket.h)

          - Returned Values: + Returned Value: 0 on success; -1 on error with errno set appropriately:

            @@ -7288,10 +7307,10 @@ Those socket APIs are discussed in the following paragraphs.

            Function Prototype:

            -
            -  #include <sys/socket.h>
            -  int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
            -
            +
              +#include <sys/socket.h>
              +int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
              +

            Description: bind() gives the socket sockfd the local address addr. @@ -7310,7 +7329,7 @@ Those socket APIs are discussed in the following paragraphs.

          • addrlen: Length of addr.

          - Returned Values: + Returned Value: 0 on success; -1 on error with errno set appropriately:

            @@ -7330,10 +7349,10 @@ Those socket APIs are discussed in the following paragraphs.

            Function Prototype:

            -
            -  #include <sys/socket.h>
            -  int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
            -
            +
              +#include <sys/socket.h>
              +int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen);
              +

            Description: connect() connects the socket referred to by the file descriptor @@ -7365,7 +7384,7 @@ Those socket APIs are discussed in the following paragraphs.

          • addrlen: Length of actual addr

          - Returned Values: + Returned Value: 0 on success; -1 on error with errno set appropriately:

        • EACCES or EPERM: @@ -7409,10 +7428,10 @@ Those socket APIs are discussed in the following paragraphs.

          Function Prototype:

          -
          -  #include <sys/socket.h>
          -  int listen(int sockfd, int backlog);
          -
          +
            +#include <sys/socket.h>
            +int listen(int sockfd, int backlog);
            +

          Description: To accept connections, a socket is first created with socket(), a @@ -7432,7 +7451,7 @@ Those socket APIs are discussed in the following paragraphs.

          the request may be ignored so that retries succeed.

        - Returned Values: + Returned Value: On success, zero is returned. On error, -1 is returned, and errno is set appropriately.

        @@ -7447,10 +7466,10 @@ Those socket APIs are discussed in the following paragraphs.

        Function Prototype:

        -
        -  #include <sys/socket.h>
        -  int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
        -
        +
          +#include <sys/socket.h>
          +int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
          +

        Description: The accept() function is used with connection-based socket types @@ -7488,7 +7507,7 @@ Those socket APIs are discussed in the following paragraphs.

      • addrlen: Input: allocated size of addr, Return: returned size of addr.

      - Returned Values: + Returned Value: Returns -1 on error. If it succeeds, it returns a non-negative integer that is a descriptor for the accepted socket.

      @@ -7525,10 +7544,10 @@ Those socket APIs are discussed in the following paragraphs.

      Function Prototype:

      -
      -  #include <sys/socket.h>
      -  ssize_t send(int sockfd, const void *buf, size_t len, int flags);
      -
      +
        +#include <sys/socket.h>
        +ssize_t send(int sockfd, const void *buf, size_t len, int flags);
        +

      Description: The send() call may be used only when the socket is in a connected state @@ -7549,7 +7568,7 @@ Those socket APIs are discussed in the following paragraphs.

    • flags: Send flags

    - Returned Values: + Returned Value: See sendto().

    @@ -7557,11 +7576,11 @@ Those socket APIs are discussed in the following paragraphs.

    Function Prototype:

    -
    -  #include <sys/socket.h>
    -  ssize_t sendto(int sockfd, const void *buf, size_t len, int flags,
    -                 const struct sockaddr *to, socklen_t tolen);
    -
    +
      +#include <sys/socket.h>
      + ssize_t sendto(int sockfd, const void *buf, size_t len, int flags,
      +               const struct sockaddr *to, socklen_t tolen);
      +

    Description: If sendto() is used on a connection-mode (SOCK_STREAM, SOCK_SEQPACKET) @@ -7582,7 +7601,7 @@ Those socket APIs are discussed in the following paragraphs.

  • tolen: The length of the address structure

    - Returned Values: + Returned Value: On success, returns the number of characters sent. On error, -1 is returned, and errno is set appropriately:

    @@ -7630,10 +7649,10 @@ Those socket APIs are discussed in the following paragraphs.

    Function Prototype:

    -
    -  #include <sys/socket.h>
    -  ssize_t recv(int sockfd, void *buf, size_t len, int flags);
    -
    +
      +#include <sys/socket.h>
      +ssize_t recv(int sockfd, void *buf, size_t len, int flags);
      +

    Description: The recv() call is identical to @@ -7652,7 +7671,7 @@ Those socket APIs are discussed in the following paragraphs.

  • flags: Receive flags
  • - Returned Values: + Returned Value: See recvfrom().

    @@ -7660,11 +7679,11 @@ Those socket APIs are discussed in the following paragraphs.

    Function Prototype:

    -
    -  #include <sys/socket.h>
    -  ssize_t recvfrom(int sockfd, void *buf, size_t len, int flags,
    -                   struct sockaddr *from, socklen_t *fromlen);
    -
    +
      +#include <sys/socket.h>
      +ssize_t recvfrom(int sockfd, void *buf, size_t len, int flags,
      +                 struct sockaddr *from, socklen_t *fromlen);
      +

    Description: recvfrom() receives messages from a socket, and may be used to receive @@ -7688,7 +7707,7 @@ Those socket APIs are discussed in the following paragraphs.

  • fromlen: The length of the address structure.
  • - Returned Values: + Returned Value: On success, returns the number of characters sent. If no data is available to be received and the peer has performed an orderly shutdown, recv() will return 0. Othwerwise, on errors, -1 is returned, and errno is set appropriately: @@ -7723,11 +7742,11 @@ Those socket APIs are discussed in the following paragraphs.

    Function Prototype:

    -
    -  #include <sys/socket.h>
    -  int setsockopt(int sockfd, int level, int option,
    -                 const void *value, socklen_t value_len);
    -
    +
      +#include <sys/socket.h>
      +int setsockopt(int sockfd, int level, int option,
      +               const void *value, socklen_t value_len);
      +

    Description: setsockopt() sets the option specified by the option argument, @@ -7753,7 +7772,7 @@ Those socket APIs are discussed in the following paragraphs.

  • value_len: The length of the argument value
  • - Returned Values: + Returned Value: On success, returns the number of characters sent. On error, -1 is returned, and errno is set appropriately:

    @@ -7783,11 +7802,11 @@ Those socket APIs are discussed in the following paragraphs.

    Function Prototype:

    -
    -  #include <sys/socket.h>
    -  int getsockopt(int sockfd, int level, int option,
    -                 void *value, socklen_t *value_len);
    -
    +
      +#include <sys/socket.h>
      +int getsockopt(int sockfd, int level, int option,
      +               void *value, socklen_t *value_len);
      +

    Description: getsockopt() retrieve those value for the option specified by the @@ -7816,7 +7835,7 @@ Those socket APIs are discussed in the following paragraphs.

  • value_len: The length of the argument value

    - Returned Values: + Returned Value: On success, returns the number of characters sent. On error, -1 is returned, and errno is set appropriately:

    @@ -7904,9 +7923,11 @@ OS resources. These hidden structures include:

    Function Prototype:

    -

        #include <errno.h>
    -    #define errno *get_errno_ptr()
    -    int *get_errno_ptr( void )
    +
      +#include <errno.h>
      +#define errno *get_errno_ptr()
      +int *get_errno_ptr(void);
      +

    Description: get_errno_ptr() returns a pointer to the thread-specific errno value.