summaryrefslogtreecommitdiffstats
path: root/posix-users
diff options
context:
space:
mode:
authorMartin Erik Werner <martinerikwerner@gmail.com>2019-09-03 01:48:28 +0200
committerChris Johns <chrisj@rtems.org>2019-09-03 09:48:35 +1000
commit2e711f2b4b59398a18d21ea34bdb064c459fdd45 (patch)
treee79c0d7ee12a966fdd93d717ec573657ea1e55ce /posix-users
parentUpdate docs for log mode change and JSON reporting (diff)
downloadrtems-docs-2e711f2b4b59398a18d21ea34bdb064c459fdd45.tar.bz2
Address several issues from compiling examples
Compiling the code from examples "code-block:: c" along with public includes and a bsp exposed a few issues amongst a lot of false positives. Address some of these: * Terminate struct declarations with ';'. Mainly for pedantic correctness. * Show ptrdiff_t instead of size_t for the sbrk() prototype, matching the current argument type in rtems. * Replace some occurrences of unsigned16 with uint16_t. * Fix odd type declaration, "uint8_t char*" -> "char*". * Use appropriate helper to get chain head instead of invalid access to nonexistent struct member. * Remove several excess '\' escapes. * Use RTEMS_SELF instead of undefined SELF. * Use rtems_task instead of void for task functions. * Add missing stack size parameter in task creation. * Use rtems_interrupt_level instead of undefined rtems_interrupt. * Correct return value format for rtems_object_id_get_api() rtems_object_id_get_index() (enum and uint16_t) and also fix corresponding print formatting. * Correct return value documentation for rtems_object_id_get_class(), rtems_object_id_get_node() and rtems_object_id_get_index() int -> uint32_t. * Use RTEMS_SUCCESSFUL instead of undefined RTEMS_STATUS_SUCCESSFUL and fix return value variable name in rate monotonic examples. * Use RTEMS_TIMEOUT instead of undefined TIMEOUT and RTEMS_PERIOD_STATUS instead of undefined STATUS. * Add missing fields to ftpd configuration. * Correct parameter types in ftpd hook prototype, unsigned char * -> void *. * Fix various code-block:: attributes, c -> makefile and c -> shell. * Add missing parenthesis in socket buffer memory calculation example. * Remove typedef in declaration of mq_attr since it is defiend without typedef in reality. * Update siginfo_t declaration to match current reality. * Update shell user command definition example to include mode, uid and gid.
Diffstat (limited to 'posix-users')
-rw-r--r--posix-users/message_passing.rst2
-rw-r--r--posix-users/signal.rst16
2 files changed, 5 insertions, 13 deletions
diff --git a/posix-users/message_passing.rst b/posix-users/message_passing.rst
index 0df9cc6..50c43dd 100644
--- a/posix-users/message_passing.rst
+++ b/posix-users/message_passing.rst
@@ -77,7 +77,7 @@ queue.
.. code-block:: c
- typedef struct mq_attr{
+ struct mq_attr{
long mq_flags;
long mq_maxmsg;
long mq_msgsize;
diff --git a/posix-users/signal.rst b/posix-users/signal.rst
index 86f2a3e..1b4694c 100644
--- a/posix-users/signal.rst
+++ b/posix-users/signal.rst
@@ -400,16 +400,12 @@ The prototype of the ``siginfo_t`` structure is the following:
{
int si_signo; /* Signal number */
int si_code; /* Cause of the signal */
- pid_t si_pid; /* Sending process ID */
- uid_t si_uid; /* Real user ID of sending process */
- void* si_addr; /* Address of faulting instruction */
- int si_status; /* Exit value or signal */
union sigval
{
int sival_int; /* Integer signal value */
void* sival_ptr; /* Pointer signal value */
} si_value; /* Signal value */
- }
+ } siginfo_t;
**NOTES:**
@@ -778,16 +774,12 @@ The prototype of the ``siginfo_t`` structure is the following:
{
int si_signo; /* Signal number */
int si_code; /* Cause of the signal */
- pid_t si_pid; /* Sending process ID */
- uid_t si_uid; /* Real user ID of sending process */
- void* si_addr; /* Address of faulting instruction */
- int si_status; /* Exit value or signal */
union sigval
{
int sival_int; /* Integer signal value */
void* sival_ptr; /* Pointer signal value */
} si_value; /* Signal value */
- }
+ } siginfo_t;
.. _sigtimedwait:
@@ -837,7 +829,7 @@ The ``timespec`` structure is defined as follows:
{
time_t tv_sec; /* Seconds */
long tv_nsec; /* Nanoseconds */
- }
+ };
**NOTES:**
@@ -895,7 +887,7 @@ The ``sigval`` union is specified as:
{
int sival_int; /* Integer signal value */
void* sival_ptr; /* Pointer signal value */
- }
+ };
**NOTES:**