Index: doc/ChangeLog
===================================================================
--- doc/ChangeLog	(revision e980b219790cb601caed749f32a43f92e3ebde26)
+++ doc/ChangeLog	(revision f8892c9bdb2f4022bc52f39f2a1f4256b2832f11)
@@ -1,2 +1,9 @@
+2004-05-06	Joel Sherrill <joel@OARcorp.com>
+
+	PR 618/rtems
+	* user/clock.t, user/dpmem.t, user/event.t, user/msg.t, user/part.t,
+	user/region.t, user/sem.t, user/task.t, user/timer.t: Add NULL
+	checks.
+
 2004-03-31	Ralf Corsepius <ralf_corsepius@rtems.org>
 
Index: doc/user/clock.t
===================================================================
--- doc/user/clock.t	(revision e980b219790cb601caed749f32a43f92e3ebde26)
+++ doc/user/clock.t	(revision f8892c9bdb2f4022bc52f39f2a1f4256b2832f11)
@@ -263,4 +263,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - date and time set successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{time_buffer} is NULL@*
 @code{@value{RPREFIX}INVALID_TIME_OF_DAY} - invalid time of day
 
@@ -321,5 +322,6 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - current time obtained successfully@*
-@code{@value{RPREFIX}NOT_DEFINED} - system date and time is not set
+@code{@value{RPREFIX}NOT_DEFINED} - system date and time is not set@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{time_buffer} is NULL
 
 @subheading DESCRIPTION:
@@ -415,5 +417,5 @@
 
 @subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - current time obtained successfully
+@code{@value{RPREFIX}SUCCESSFUL} - clock tick processed successfully
 
 @subheading DESCRIPTION:
Index: doc/user/dpmem.t
===================================================================
--- doc/user/dpmem.t	(revision e980b219790cb601caed749f32a43f92e3ebde26)
+++ doc/user/dpmem.t	(revision f8892c9bdb2f4022bc52f39f2a1f4256b2832f11)
@@ -140,4 +140,5 @@
 @code{@value{RPREFIX}INVALID_NAME} - invalid task name@*
 @code{@value{RPREFIX}INVALID_ADDRESS} - address not on four byte boundary@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{id} is NULL@*
 @code{@value{RPREFIX}TOO_MANY} - too many DP memory areas created
 
@@ -196,4 +197,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - port identified successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{id} is NULL@*
 @code{@value{RPREFIX}INVALID_NAME} - port name not found
 
@@ -292,5 +294,6 @@
 
 @subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} -  always successful
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{internal} is NULL@*
+@code{@value{RPREFIX}SUCCESSFUL} - successful conversion
 
 @subheading DESCRIPTION:
@@ -342,5 +345,6 @@
 
 @subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} -  always successful
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{external} is NULL@*
+@code{@value{RPREFIX}SUCCESSFUL} - successful conversion
 
 @subheading DESCRIPTION:
Index: doc/user/event.t
===================================================================
--- doc/user/event.t	(revision e980b219790cb601caed749f32a43f92e3ebde26)
+++ doc/user/event.t	(revision f8892c9bdb2f4022bc52f39f2a1f4256b2832f11)
@@ -296,4 +296,5 @@
 @code{@value{RPREFIX}SUCCESSFUL} - event received successfully@*
 @code{@value{RPREFIX}UNSATISFIED} - input event not satisfied (@code{@value{RPREFIX}NO_WAIT})@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{event_out} is NULL@*
 @code{@value{RPREFIX}TIMEOUT} - timed out waiting for event
 
Index: doc/user/msg.t
===================================================================
--- doc/user/msg.t	(revision e980b219790cb601caed749f32a43f92e3ebde26)
+++ doc/user/msg.t	(revision f8892c9bdb2f4022bc52f39f2a1f4256b2832f11)
@@ -256,4 +256,5 @@
 @code{@value{RPREFIX}SUCCESSFUL} - queue created successfully@*
 @code{@value{RPREFIX}INVALID_NAME} - invalid task name@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{id} is NULL@*
 @code{@value{RPREFIX}INVALID_NUMBER} - invalid message count@*
 @code{@value{RPREFIX}INVALID_SIZE} - invalid message size@*
@@ -342,4 +343,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - queue identified successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{id} is NULL@*
 @code{@value{RPREFIX}INVALID_NAME} - queue name not found@*
 @code{@value{RPREFIX}INVALID_NODE} - invalid node id
@@ -474,4 +476,5 @@
 @code{@value{RPREFIX}INVALID_ID} - invalid queue id@*
 @code{@value{RPREFIX}INVALID_SIZE} - invalid message size@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{buffer} is NULL@*
 @code{@value{RPREFIX}UNSATISFIED} - out of message buffers@*
 @code{@value{RPREFIX}TOO_MANY} - queue's limit has been reached
@@ -538,4 +541,5 @@
 @code{@value{RPREFIX}INVALID_ID} - invalid queue id@*
 @code{@value{RPREFIX}INVALID_SIZE} - invalid message size@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{buffer} is NULL@*
 @code{@value{RPREFIX}UNSATISFIED} - out of message buffers@*
 @code{@value{RPREFIX}TOO_MANY} - queue's limit has been reached
@@ -604,4 +608,6 @@
 @code{@value{RPREFIX}SUCCESSFUL} - message broadcasted successfully@*
 @code{@value{RPREFIX}INVALID_ID} - invalid queue id@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{buffer} is NULL@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{count} is NULL@*
 @code{@value{RPREFIX}INVALID_SIZE} - invalid message size
 
@@ -675,4 +681,6 @@
 @code{@value{RPREFIX}SUCCESSFUL} - message received successfully@*
 @code{@value{RPREFIX}INVALID_ID} - invalid queue id@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{buffer} is NULL@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{count} is NULL@*
 @code{@value{RPREFIX}UNSATISFIED} - queue is empty@*
 @code{@value{RPREFIX}TIMEOUT} - timed out waiting for message@*
@@ -760,4 +768,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - number of messages pending returned successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{count} is NULL@*
 @code{@value{RPREFIX}INVALID_ID} - invalid queue id
 
@@ -808,4 +817,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - message queue flushed successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{count} is NULL@*
 @code{@value{RPREFIX}INVALID_ID} - invalid queue id
 
Index: doc/user/part.t
===================================================================
--- doc/user/part.t	(revision e980b219790cb601caed749f32a43f92e3ebde26)
+++ doc/user/part.t	(revision f8892c9bdb2f4022bc52f39f2a1f4256b2832f11)
@@ -174,4 +174,6 @@
 @code{@value{RPREFIX}TOO_MANY} - too many partitions created@*
 @code{@value{RPREFIX}INVALID_ADDRESS} - address not on four byte boundary@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{starting_address} is NULL@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{id} is NULL@*
 @code{@value{RPREFIX}INVALID_SIZE} - length or buffer size is 0@*
 @code{@value{RPREFIX}INVALID_SIZE} - length is less than the buffer size@*
@@ -258,4 +260,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - partition identified successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{id} is NULL@*
 @code{@value{RPREFIX}INVALID_NAME} - partition name not found@*
 @code{@value{RPREFIX}INVALID_NODE} - invalid node id
@@ -377,4 +380,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - buffer obtained successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{buffer} is NULL@*
 @code{@value{RPREFIX}INVALID_ID} - invalid partition id@*
 @code{@value{RPREFIX}UNSATISFIED} - all buffers are allocated
@@ -431,4 +435,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - buffer returned successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{buffer} is NULL@*
 @code{@value{RPREFIX}INVALID_ID} - invalid partition id@*
 @code{@value{RPREFIX}INVALID_ADDRESS} - buffer address not in partition
Index: doc/user/region.t
===================================================================
--- doc/user/region.t	(revision e980b219790cb601caed749f32a43f92e3ebde26)
+++ doc/user/region.t	(revision f8892c9bdb2f4022bc52f39f2a1f4256b2832f11)
@@ -264,4 +264,6 @@
 @code{@value{RPREFIX}SUCCESSFUL} - region created successfully@*
 @code{@value{RPREFIX}INVALID_NAME} - invalid task name@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{id} is NULL@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{starting_address} is NULL@*
 @code{@value{RPREFIX}INVALID_ADDRESS} - address not on four byte boundary@*
 @code{@value{RPREFIX}TOO_MANY} - too many regions created@*
@@ -340,4 +342,5 @@
 
 @code{@value{RPREFIX}SUCCESSFUL} - region identified successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{id} is NULL@*
 @code{@value{RPREFIX}INVALID_NAME} - region name not found
 
@@ -440,4 +443,5 @@
 
 @code{@value{RPREFIX}SUCCESSFUL} - region extended successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{starting_address} is NULL@*
 @code{@value{RPREFIX}INVALID_ID} - invalid region id@*
 @code{@value{RPREFIX}INVALID_ADDRESS} - invalid address of area to add
@@ -495,4 +499,5 @@
 
 @code{@value{RPREFIX}SUCCESSFUL} - segment obtained successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{segment} is NULL@*
 @code{@value{RPREFIX}INVALID_ID} - invalid region id@*
 @code{@value{RPREFIX}INVALID_SIZE} - request is for zero bytes or exceeds
@@ -582,4 +587,5 @@
 
 @code{@value{RPREFIX}SUCCESSFUL} - segment returned successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{segment} is NULL@*
 @code{@value{RPREFIX}INVALID_ID} - invalid region id@*
 @code{@value{RPREFIX}INVALID_ADDRESS} - segment address not in region
@@ -643,4 +649,6 @@
 
 @code{@value{RPREFIX}SUCCESSFUL} - segment obtained successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{segment} is NULL@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{size} is NULL@*
 @code{@value{RPREFIX}INVALID_ID} - invalid region id@*
 @code{@value{RPREFIX}INVALID_ADDRESS} - segment address not in region
Index: doc/user/sem.t
===================================================================
--- doc/user/sem.t	(revision e980b219790cb601caed749f32a43f92e3ebde26)
+++ doc/user/sem.t	(revision f8892c9bdb2f4022bc52f39f2a1f4256b2832f11)
@@ -410,4 +410,5 @@
 @code{@value{RPREFIX}SUCCESSFUL} - semaphore created successfully@*
 @code{@value{RPREFIX}INVALID_NAME} - invalid task name@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{id} is NULL@*
 @code{@value{RPREFIX}TOO_MANY} - too many semaphores created@*
 @code{@value{RPREFIX}NOT_DEFINED} - invalid attribute set@*
Index: doc/user/task.t
===================================================================
--- doc/user/task.t	(revision e980b219790cb601caed749f32a43f92e3ebde26)
+++ doc/user/task.t	(revision f8892c9bdb2f4022bc52f39f2a1f4256b2832f11)
@@ -713,4 +713,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - task created successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{id} is NULL@*
 @code{@value{RPREFIX}INVALID_NAME} - invalid task name@*
 @code{@value{RPREFIX}INVALID_SIZE} - stack too small@*
@@ -820,4 +821,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - task identified successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{id} is NULL@*
 @code{@value{RPREFIX}INVALID_NAME} - invalid task name@*
 @code{@value{RPREFIX}INVALID_NODE} - invalid node id
@@ -1261,5 +1263,5 @@
 @ifset is-Ada
 @example
-procedure Task_Delete (
+procedure Task_Mode (
    Mode_Set          : in     RTEMS.Mode;
    Mask              : in     RTEMS.Mode;
@@ -1271,5 +1273,6 @@
 
 @subheading DIRECTIVE STATUS CODES:
-@code{@value{RPREFIX}SUCCESSFUL} - task mode set successfully
+@code{@value{RPREFIX}SUCCESSFUL} - task mode set successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{previous_mode_set} is NULL
 
 @subheading DESCRIPTION:
@@ -1432,4 +1435,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - note obtained successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{note} is NULL@*
 @code{@value{RPREFIX}INVALID_ID} - invalid task id@*
 @code{@value{RPREFIX}INVALID_NUMBER} - invalid notepad location
@@ -1590,4 +1594,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - awakened at date/time successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{time_buffer} is NULL@*
 @code{@value{RPREFIX}INVALID_TIME_OF_DAY} - invalid time buffer@*
 @code{@value{RPREFIX}NOT_DEFINED} - system date and time is not set
@@ -1619,5 +1624,5 @@
 rtems_status_code rtems_task_variable_add(
   rtems_id  tid,
-  void    **ptr,
+  void    **task_variable,
   void    (*dtor)(void *)
 );
@@ -1642,4 +1647,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - per task variable added successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{task_variable} is NULL@*
 @code{@value{RPREFIX}INVALID_ID} - invalid task id@*
 @code{@value{RPREFIX}NO_MEMORY} - invalid task id@*
@@ -1681,6 +1687,6 @@
 rtems_status_code rtems_task_variable_get(
   rtems_id  tid,
-  void    **ptr,
-  void    **result
+  void    **task_variable,
+  void    **task_variable_value
 );
 @end example
@@ -1700,5 +1706,7 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - per task variable added successfully@*
-@code{@value{RPREFIX}INVALID_ID} - invalid task id@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{task_variable} is NULL@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{task_variable_value} is NULL@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{task_variable} is not found@*
 @code{@value{RPREFIX}NO_MEMORY} - invalid task id@*
 @code{@value{RPREFIX}ILLEGAL_ON_REMOTE_OBJECT} - not supported on remote tasks@*
@@ -1712,7 +1720,8 @@
 @subheading NOTES:
 
-If you change memory which @code{result} points to, remember to declare that
-memory as volatile, so that the compiler will optimize it correctly.  In this
-case both the pointer @code{result} and data referenced by @code{result}
+If you change memory which @code{task_variable_value} points to,
+remember to declare that memory as volatile, so that the compiler
+will optimize it correctly.  In this case both the pointer
+@code{task_variable_value} and data referenced by @code{task_variable_value}
 should be considered volatile.
 
@@ -1732,5 +1741,5 @@
 rtems_status_code rtems_task_variable_delete(
   rtems_id  tid,
-  void    **ptr
+  void    **task_variable
 );
 @end example
@@ -1751,4 +1760,5 @@
 @code{@value{RPREFIX}INVALID_ID} - invalid task id@*
 @code{@value{RPREFIX}NO_MEMORY} - invalid task id@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{task_variable} is NULL@*
 @code{@value{RPREFIX}ILLEGAL_ON_REMOTE_OBJECT} - not supported on remote tasks@*
 
Index: doc/user/timer.t
===================================================================
--- doc/user/timer.t	(revision e980b219790cb601caed749f32a43f92e3ebde26)
+++ doc/user/timer.t	(revision f8892c9bdb2f4022bc52f39f2a1f4256b2832f11)
@@ -234,4 +234,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - timer created successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{id} is NULL@*
 @code{@value{RPREFIX}INVALID_NAME} - invalid timer name@*
 @code{@value{RPREFIX}TOO_MANY} - too many timers created
@@ -282,4 +283,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - timer identified successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{id} is NULL@*
 @code{@value{RPREFIX}INVALID_NAME} - timer name not found
 
@@ -423,4 +425,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - timer initiated successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{routine} is NULL@*
 @code{@value{RPREFIX}INVALID_ID} - invalid timer id@*
 @code{@value{RPREFIX}INVALID_NUMBER} - invalid interval
@@ -476,4 +479,6 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - timer initiated successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{routine} is NULL@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{wall_time} is NULL@*
 @code{@value{RPREFIX}INVALID_ID} - invalid timer id@*
 @code{@value{RPREFIX}NOT_DEFINED} - system date and time is not set@*
@@ -584,4 +589,5 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - timer initiated successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{routine} is NULL@*
 @code{@value{RPREFIX}INVALID_ID} - invalid timer id@*
 @code{@value{RPREFIX}INVALID_NUMBER} - invalid interval@*
@@ -640,4 +646,6 @@
 @subheading DIRECTIVE STATUS CODES:
 @code{@value{RPREFIX}SUCCESSFUL} - timer initiated successfully@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{routine} is NULL@*
+@code{@value{RPREFIX}INVALID_ADDRESS} - @code{wall_time} is NULL@*
 @code{@value{RPREFIX}INVALID_ID} - invalid timer id@*
 @code{@value{RPREFIX}NOT_DEFINED} - system date and time is not set@*
