Index: trunk/libs/libalmosmkh/almosmkh.h
===================================================================
--- trunk/libs/libalmosmkh/almosmkh.h	(revision 678)
+++ trunk/libs/libalmosmkh/almosmkh.h	(revision 685)
@@ -2,5 +2,5 @@
  * almosmkh.h - User level ALMOS-MKH specific library definition.
  * 
- * Author     Alain Greiner (2016,2017,2018,2019,2020)
+ * Author        Alain Greiner (2016,2017,2018,2019,2020)
  *
  * Copyright (c) UPMC Sorbonne Universites
@@ -26,14 +26,53 @@
 
 /*************************************************************************************** 
- * This file defines an user level, ALMOS-MKH specific library, containing: 
+ * This file defines an user level, ALMOS-MKH specific library, containing various
+ * non standard functions and system calls:
+ *
+ * - non standard get_uint32() and get_string() functions. 
  * - non standard system calls.
- * - debug functions.
- * - remote malloc extensions.
- * - a parallel_pthread_create function.
- * - Frame Buffer access syscalls.
+ * - non standard debug functions.
+ * - non standard remote_malloc() functions.
+ * - non standard parallel_pthread_create() function.
+ * - non standard FBF access syscalls.
  **************************************************************************************/
 
 #include <pthread.h>
 #include <shared_almos.h>
+
+
+/****************** Non standard (ALMOS_MKH specific) functions  **********************/
+
+
+/***************************************************************************************
+ * This syscall returns a 32 bits integer captures from the STDIN terminal.
+ * The value is copied in buffer pointed by the <buf> argument
+ * Both decimal numbers and hexadecimal numbers (prefixed by 0x) are supported.
+ ***************************************************************************************
+ * @ buffer    : pointer on buffer.
+ * @ returns 0 if success / returns -1 if failure.
+ **************************************************************************************/
+void get_uint32( unsigned int * buffer );
+
+
+/***************************************************************************************
+ * These syscalls return a NUL terminated string captured from the STDIN terminal.
+ * The characters are copied in buffer pointed by the <string> argument. 
+ * If the number of captured characters exceeds <maxlen>, all characters are discarded,
+ * and removed from the <string> buffer, and a new string capture start. 
+ * - All printable characters 'c' such as (0x20 <= c) and (c < 0x7f) are echoed
+ *   and copied in the target buffer. 
+ * - The LF (0x0A) or CR (0x13) characters are interpreted as "end of string". 
+ *   It is echoed, and replaced by the NUL (0x00) character in the target buffer.
+ * - The DEL (0x7F), BS (0x08) control characters are taken into account, and can be
+ *   used to correct both the buffer content and the echoed string.
+ * - All other non printable characters are discarded
+ ***************************************************************************************
+ * @ string   : pointer on the user space string buffer.
+ * @ maxlen   : max number of bytes in string buffer, including the terminating NUL.
+ * @ returns string length (including NUL) if success / returns 0 if failure.
+ **************************************************************************************/
+int get_string( char * string,
+                int    maxlen );
+
 
 
@@ -112,4 +151,20 @@
                    unsigned int * lid );
 
+/*************************************************************************************** 
+ * This syscall returns in the user buffer defined by the <u_buf> and <size> arguments
+ * a string containing the description of the processes registered in cluster specified
+ * by the <cxy> argument (one line per process in the NUL terminated string).
+ * Only the owned processes are returned when the <owned> argument is non zero. 
+ * It can be called by any thread running in any cluster.
+ ***************************************************************************************
+ * @ cxy      : [in] target cluster identifier.
+ * @ owned    : [in] only owned processes if non zero.
+ * @ return 0 if success / return -1 if illegal argument.
+ **************************************************************************************/
+int get_processes( unsigned int   cxy,
+                   unsigned int   owned,
+                   char         * u_buf,
+                   unsigned int   size );
+
 /***************************************************************************************
  * This function returns the value contained in the calling core cycles counter,
@@ -120,56 +175,4 @@
  **************************************************************************************/
 int get_cycle( unsigned long long * cycle );
-
-/***************************************************************************************
- * This syscall allows the calling thread to specify the target cluster for
- * a subsequent fork(). It must be called for each fork().
- ***************************************************************************************
- * @ cxy      : [in] target cluster identifier.
- * @ return 0 if success / returns -1 if illegal cxy argument.
- **************************************************************************************/
-int place_fork( unsigned int cxy );
-
-/*************************************************************************************** 
- * This syscall implements the operations related to User Thread Local Storage.
- ***************************************************************************************
- * @ operation  : UTLS operation type as defined in "shared_sycalls.h" file.
- * @ value      : argument value for the UTLS_SET operation.
- * @ return value for the UTLS_GET and UTLS_GET_ERRNO / return -1 if failure.
- **************************************************************************************/
-int utls( unsigned int operation,
-          unsigned int value );
-
-/***************************************************************************************
- * This syscall returns an 32 bits integer from the TXT terminal.
- * The value is copied in buffer pointed by the <buf> argument
- * Both decimal numbers and hexadecimal numbers (prefixed by 0x) are supported.
- ***************************************************************************************
- * @ buffer    : pointer on buffer.
- * @ returns 0 if success / returns -1 if failure.
- **************************************************************************************/
-void get_uint32( unsigned int * buffer );
-
-
-/***************************************************************************************
- * These syscalls return a NUL terminated character string from the TXT terminal.
- * The characters are copied in buffer pointed by the <string> argument. 
- * If the number of characters exceeds <maxlen>, all read characters are discarded,
- * and removed from the <string> buffer, and a new string capture start. 
- * - Only printable characters c such as (0x20 <= c) and (c < 0x7f) are echoed
- *   and copied in the target buffer. 
- * - The LF (0x0A) character signaling the end of string is replaced by an extra
- *   NUL (0x00) character in the target buffer.
- * - the DEL (0x7F), BS (0x08) control characters are taken into account, and can be
- *   used to correct both the buffer content and the echoed string.
- ***************************************************************************************
- * @ string   : pointer on the user space string buffer.
- * @ maxlen   : max number of bytes in string buffer, including the terminating NUL.
- * @ returns string length (including NUL) if success / returns 0 if failure.
- **************************************************************************************/
-int get_string( char * string,
-                int    maxlen );
-
-
-/***************** Non standard (ALMOS-MKH specific) debug functions ******************/
 
 /*************************************************************************************** 
@@ -182,8 +185,30 @@
 int get_thread_info( thread_info_t * info );
 
+/***************************************************************************************
+ * This syscall allows the calling thread to specify the target cluster for
+ * a subsequent fork(). It must be called for each fork().
+ ***************************************************************************************
+ * @ cxy      : [in] target cluster identifier.
+ * @ return 0 if success / returns -1 if illegal cxy argument.
+ **************************************************************************************/
+int place_fork( unsigned int cxy );
+
+/*************************************************************************************** 
+ * This syscall implements the operations related to User Thread Local Storage.
+ ***************************************************************************************
+ * @ operation  : UTLS operation type as defined in "shared_sycalls.h" file.
+ * @ value      : argument value for the UTLS_SET operation.
+ * @ return value for the UTLS_GET and UTLS_GET_ERRNO / return -1 if failure.
+ **************************************************************************************/
+int utls( unsigned int operation,
+          unsigned int value );
+
+
+
+/***************** Non standard (ALMOS-MKH specific) debug functions ******************/
+
 /*************************************************************************************** 
  * This debug syscall displays on the kernel terminal TXT0
- * the thread / process / core identifiers, the current cycle, plus a user defined
- * message as specified by the <string> argument. 
+ * an user defined message specified by the <string> argument, plus the current cycle. 
  ***************************************************************************************
  * @ string    : [in] user defined message.
