From c9a7d81146415e62614b4d18d3b8e7145e0f18a7 Mon Sep 17 00:00:00 2001
From: patacongo User's Manual by Gregory Nutt
- Last Updated: March 13, 2009 Last Updated: May 9, 2009NuttX Operating System
- The following task control interfaces are provided by Nuttx: + The following task control interfaces are provided by NuttX:
@@ -281,7 +281,7 @@ VxWorks provides the following similar interface:
Description: This function causes the calling task to cease to exist -- its stack and TCB will be deallocated. exit differs from -_exit in that it flushs streams, closes file descriptors and will +_exit in that it flushes streams, closes file descriptors and will execute any function registered with atexit().
Input Parameters: @@ -491,7 +491,7 @@ execute any function registered with atexit().
void exit( int code );-And the unix interface: +And the UNIX interface:
void _exit( int code );@@ -1065,7 +1065,7 @@ on this thread of execution.
- NuttX supports POSIX named message queues for intertask communication. + NuttX supports POSIX named message queues for inter-task communication. Any task may send or receive messages on named message queues. Interrupt handlers may send messages via named message queues.
@@ -1699,7 +1699,7 @@ interface of the same name. Proper use of semaphores avoids the issues ofsched_lock()
.
However, consider the following example:
CONFIG_SEM_PREALLOCHOLDERS
defines the maximum
number of different threads (minus one per semaphore instance) that can
take counts on a semaphore with priority inheritance support.
- This setting defines the size of a single pool of preallocated structures.
+ This setting defines the size of a single pool of pre-allocated structures.
It may be set to zero if priority inheritance is disabled OR if you
are only using semaphores as mutexes (only one holder) OR if no more
than two threads participate using a counting semaphore.
@@ -1797,7 +1797,7 @@ interface of the same name.
These various structures tie the semaphore implementation more tightly to
the behavior of the implementation. For examples, if a thread executes while
holding counts on a semaphore, or if a thread exits without call sem_destroy()
- then. Or what if the thread with the boosted priority reprioritizes itself?
+ then. Or what if the thread with the boosted priority re-prioritizes itself?
The NuttX implement of priority inheritance attempts to handle all of these
types of corner cases, but it is very likely that some are missed.
The worst case result is that memory could by stranded within the priority
@@ -2022,7 +2022,7 @@ interface of the same name.
Description: This function will remove the semaphore named by the input name parameter. If one or more tasks have the semaphore named by -name oepn when sem_unlink() is called, destruction of the semaphore will +name open when sem_unlink() is called, destruction of the semaphore will be postponed until all references have been destroyed by calls to sem_close().
@@ -2326,7 +2326,7 @@ VxWorks provides the following comparable interface: Differences from the VxWorks interface include:
timerid
. The pre-thread timer, previously created by the call to timer_create(), to be be set.flags
. Specifie characteristics of the timer (see above)flags
. Specify characteristics of the timer (see above)value
. Specifies the timer value to setovalue
. A location in which to return the time remaining from the previous timer setting (ignored).When a signal is caught by a signal-catching function installed by the sigaction() function, a new signal mask is calculated and installed for @@ -3384,7 +3384,7 @@ for si_code are defined in signal.h:
Returned Values:
-If successful, the ptnread_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:
Any pending thread cancelation may occur at the time that the -cancelation state is set to PTHREAD_CANCEL_ENABLE.
+Any pending thread cancellation may occur at the time that the +cancellation state is set to PTHREAD_CANCEL_ENABLE.
Input Parameters:
Returned Values: @@ -4682,7 +4682,7 @@ interface of the same name.
-Function Protoype: +Function Prototype:
#include <pthread.h> @@ -4830,15 +4830,15 @@ returned to indicate the error:
type
. The mutex type value to set. The following values are supported:
PTHREAD_MUTEX_NORMAL
. This type of mutex does not detect deadlock. A thread
- attempting to relock this mutex without first unlocking it will deadlock.
+ attempting to re-lock this mutex without first unlocking it will deadlock.
Attempting to unlock a mutex locked by a different thread results in undefined
behavior. Attempting to unlock an unlocked mutex results in undefined behavior. PTHREAD_MUTEX_ERRORCHECK
. This type of mutex provides error checking.
- A thread attempting to relock this mutex without first unlocking it will return with an error.
+ A thread attempting to re-lock this mutex without first unlocking it will return with an error.
A thread attempting to unlock a mutex which another thread has locked will return with an error.
A thread attempting to unlock an unlocked mutex will return with an error.PTHREAD_MUTEX_RECURSIVE
. A thread attempting to relock this mutex without first
- unlocking it will succeed in locking the mutex. The relocking deadlock which can occur with mutexes
+ PTHREAD_MUTEX_RECURSIVE
. A thread attempting to re-lock this mutex without first
+ unlocking it will succeed in locking the mutex. The re-locking deadlock which can occur with mutexes
of type PTHREAD_MUTEX_NORMAL cannot occur with this type of mutex. Multiple locks of this mutex
require the same number of unlocks to release the mutex before another thread can acquire the mutex.
A thread attempting to unlock a mutex which another thread has locked will return with an error.
@@ -4944,7 +4944,7 @@ interface of the same name.
If the mutex type is PTHREAD_MUTEX_NORMAL
, deadlock detection is not provided.
- Attempting to relock the mutex causes deadlock. If a thread attempts to unlock
+ Attempting to re-lock the mutex causes deadlock. If a thread attempts to unlock
a mutex that it has not locked or a mutex which is unlocked, undefined behavior
results.
If the mutex type is PTHREAD_MUTEX_ERRORCHECK
, then error checking is provided.
- If a thread attempts to relock a mutex that it has already locked, an error
+ If a thread attempts to re-lock a mutex that it has already locked, an error
will be returned. If a thread attempts to unlock a mutex that it has not
locked or a mutex which is unlocked, an error will be returned.
If the mutex type is PTHREAD_MUTEX_RECURSIVE
, then the mutex maintains the concept
of a lock count. When a thread successfully acquires a mutex for the first time,
- the lock count is set to one. Every time a thread relocks this mutex, the lock count
+ the lock count is set to one. Every time a thread re-locks this mutex, the lock count
is incremented by one. Each time the thread unlocks the mutex, the lock count is
decremented by one. When the lock count reaches zero, the mutex becomes available
for other threads to acquire. If a thread attempts to unlock a mutex that it has
@@ -5592,7 +5592,7 @@ interface of the same name.
Description:
- The pthread_barrier_wait()
function synchronizse participating
+ The pthread_barrier_wait()
function synchronizes participating
threads at the barrier referenced by barrier
.
The calling thread is blocked until the required number of threads have called
pthread_barrier_wait()
specifying the same barrier
.
@@ -5665,7 +5665,7 @@ interface of the same name.
once_control
.
Determines if init_routine()
should be called.
- once_control
should be declared and intialized as follows:
+ once_control
should be declared and initialized as follows:
pthread_once_t once_control = PTHREAD_ONCE_INIT;
PTHREAD_ONCE_INIT
is defined in pthread.h
.
@@ -5795,7 +5795,7 @@ interface of the same name.
Returned Values:
- 0 (OK) on succes or EINVAL if how
is invalid.
+ 0 (OK) on success or EINVAL if how
is invalid.
Assumptions/Limitations: @@ -5815,7 +5815,7 @@ interface of the same name.
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: + environment variables in the multi-processing OS:
Programming Interfaces. @@ -5875,7 +5875,7 @@ interface of the same name.
Returned Values: - The value of the valiable (read-only) or NULL on failure. + The value of the variable (read-only) or NULL on failure.
putenv
Returned Values: - Zero on sucess. + Zero on success.
clearenv
Overview. NuttX includes an optional, scalable file system. - This file-system may be omitted altogther; NuttX does not depend on the presence + This file-system may be omitted altogether; NuttX does not depend on the presence of any file system.
Pseudo Root File System.
- Or, a simple in-memory, psuedo file system can be enabled.
+ Or, a simple in-memory, pseudo file system can be enabled.
This simple file system can be enabled setting the CONFIG_NFILE_DESCRIPTORS
option to a non-zero value.
This is an in-memory file system because it does not require any
storage medium or block driver support.
Rather, file system contents are generated on-the-fly as referenced via
standard file system operations (open, close, read, write, etc.).
- In this sense, the file system is psuedo file system (in the
+ In this sense, the file system is pseudo file system (in the
same sense that the Linux /proc
file system is also
- referred to as a psuedo file system).
+ referred to as a pseudo file system).
- Any user supplied data or logic can be accessed via the psuedo-file system.
+ Any user supplied data or logic can be accessed via the pseudo-file system.
Built in support is provided for character and block drivers in the
- /dev
psuedo file system directory.
+ /dev
pseudo file system directory.
Mounted File Systems
@@ -6046,7 +6046,7 @@ interface of the same name.
devices that provide access to true file systems backed up via some
mass storage device.
NuttX supports the standard mount()
command that allows
- a block driver to be bound to a mountpoint within the psuedo file system
+ a block driver to be bound to a mount-point within the pseudo file system
and to a a file system.
At present, NuttX supports only the VFAT file system.
- On success, the number of structures that have nonzero revents
fields.
A value of 0 indicates that the call timed out and no file descriptors were ready.
On error, -1 is returned, and errno
is set appropriately:
fmt
, bad cluster size in fmt
ENOENT
-
- pathname
does not refer to anything in the filesystem.
+ pathname
does not refer to anything in the file-system.
ENOTBLK
-
pathname
does not refer to a block driver
@@ -6454,14 +6454,14 @@ struct fat_format_s
access media under the following very restrictive conditions:
FIOC_MMAP
ioctl command.
+ The file-system supports the FIOC_MMAP
ioctl command.
Any file system that maps files contiguously on the media should support this
ioctl
command.
By comparison, most file system scatter files over the media in non-contiguous
sectors. As of this writing, ROMFS is the only file system that meets this requirement.
BIOC_XIPBASE
ioctl
command
+ The underlying block driver supports the BIOC_XIPBASE
ioctl
command
that maps the underlying media to a randomly accessible address.
At present, only the RAM/ROM disk driver does this.
ENODEV
-
- The underlying filesystem of the specified file does not support memory mapping.
+ The underlying file-system of the specified file does not support memory mapping.
Description:
- getsockopt()
retrieve thse value for the option specified by the
+ getsockopt()
retrieve those value for the option specified by the
option
argument for the socket specified by the sockfd
argument. If
the size of the option value is greater than value_len
, the value
stored in the object pointed to by the value
argument will be silently
--
cgit v1.2.3