From e155bf66dfc0d35aad24cbd35ffa82bfc57962cb Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 30 Jun 2007 23:42:46 +0000 Subject: [PATCH] document environment variables git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@299 42af7a65-404d-4744-a932-0658087f49c3 --- Documentation/NuttX.html | 2 +- Documentation/NuttxUserGuide.html | 356 ++++++++++++++++++++++-------- TODO | 2 + 3 files changed, 273 insertions(+), 87 deletions(-) diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index fad801a840..fa3dbdd071 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -8,7 +8,7 @@

NuttX RTOS

-

Last Updated: June 9, 2007

+

Last Updated: June 30, 2007

diff --git a/Documentation/NuttxUserGuide.html b/Documentation/NuttxUserGuide.html index 46b4b2be44..7f0b7e5bf0 100644 --- a/Documentation/NuttxUserGuide.html +++ b/Documentation/NuttxUserGuide.html @@ -21,7 +21,7 @@ User's Manual

Gregory Nutt

-Last Update: May 27, 2007 +Last Update: June 30, 2007

1.0 Introduction

@@ -53,7 +53,8 @@ Gregory Nutt
  • Paragraph 2.7 Clocks and Timers
  • Paragraph 2.8 Signal Interfaces
  • Paragraph 2.9 Pthread Interfaces
  • -
  • Paragraph 2.10 Filesystem Interfaces
  • +
  • Paragraph 2.10 Environment Variables
  • +
  • Paragraph 2.11 Filesystem Interfaces
  • @@ -2208,9 +2209,7 @@ queue. The specified watchdog function will be called from the interrupt level after the specified number of ticks has elapsed. Watchdog timers may be started from the interrupt level.

    -Watchdog times execute in the context of the timer interrupt handler, but -with the PIC/PID address environment that was in place when wd_start() -was called. +Watchdog times execute in the context of the timer interrupt handler.

    Watchdog timers execute only once.

    @@ -5502,6 +5501,272 @@ interface of the same name. POSIX Compatibility: Comparable to the POSIX interface of the same name.

    +

    2.10 Environment Variables

    +

    Overview. + NuttX supports environment variables that can be used to control the behavior of programs. + In the spirit of NuttX the environment variable behavior attempts to emulate the behavior of + environment variables in the mulit-processing OS: +

    + +

    Programming Interfaces. + The following environment variable programming interfaces are provided by Nuttx and are + described in detail in the following paragraphs. +

    + +

    Disabling Environment Variable Support. + All support for environment variables can be disabled by setting CONFIG_DISABLE_ENVIRONMENT + in the board configuration file. +

    + +

    2.10.1 getenv

    +

    + Function Prototype: +

    +
    +  #include 
    +  FAR char *getenv(const char *name);
    +
    +

    + Description: + The getenv() function searches the environment list for a string that + matches the string pointed to by name. +

    +

    + Input Parameters: +

    +

    +

    +

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

    + +

    2.10.2 putenv

    +

    + Function Prototype: +

    +
    +  #include 
    +  int putenv(char *string);
    +
    +

    + Description: + The putenv() function adds or changes the value of environment variables. + The argument string is of the form name=value. If name does not already + exist in the environment, then string is added to the environment. If + name does exist, then the value of name in the environment is changed to + value. +

    +

    + Input Parameters: +

    +

    +

    +

    + Returned Values: + Zero on sucess. +

    + +

    2.10.3 clearenv

    +

    + Function Prototype: +

    +
    +  #include 
    +  int clearenv(void);
    +
    +

    + Description: + The clearenv() function clears the environment of all name-value pairs + and sets the value of the external variable environ to NULL. +

    +

    + Input Parameters: + None +

    +

    + Returned Values: + Zero on success. +

    + +

    2.10.4 setenv

    +

    + Function Prototype: +

    +
    +  #include 
    +  int setenv(const char *name, const char *value, int overwrite);
    +
    +

    + Description: + The setenv() function adds the variable name to the environment with the + specified value if the variable name does not exist. If the name + does exist in the environment, then its value is changed to value if overwrite + is non-zero; if overwrite is zero, then the value of name is unaltered. +

    +

    + Input Parameters: +

    +

    +

    +

    + Returned Values: + Zero on success. +

    + +

    2.10.5 unsetenv

    +

    + Function Prototype: +

    +
    +  #include 
    +  int unsetenv(const char *name);
    +
    +

    + Description: + The unsetenv() function deletes the variable name from the environment. +

    +

    + Input Parameters: +

    +

    +

    +

    + Returned Values: + Zero on success. +

    + +

    2.11 Filesystem Interfaces

    +

    + 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 + (open(), close(), read(), write, etc.) + and a registration mechanism that allows devices drivers to a associated with nodes + in a file-system-like name space. +

    + +

    2.11.1 Driver Operations

    + + + + + + +

    2.11.2 Directory Operations

    + + +

    2.11.3 Standard I/O

    + +

    3.0 OS Data Structures

    3.1 Scalar types

    @@ -5704,87 +5969,6 @@ notify a task when a message is available on a queue. have to do some redesign.

    -

    2.10 Filesystem Interfaces

    -

    - 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 - (open(), close(), read(), write, etc.) - and a registration mechanism that allows devices drivers to a associated with nodes - in a file-system-like name space. -

    - -

    2.10.1 Driver Operations

    - - - - - - -

    2.10.2 Directory Operations

    - - -

    2.10.3 Standard I/O

    - -

    Index