Changeset 589 for trunk/libs/libalmosmkh


Ignore:
Timestamp:
Nov 1, 2018, 12:48:51 PM (6 years ago)
Author:
alain
Message:

Introduce a pause() syscall in mini-libc/unistd library.

Location:
trunk/libs/libalmosmkh
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libs/libalmosmkh/almosmkh.c

    r580 r589  
    7979}
    8080
     81//////////////////////////////////
     82int place_fork( unsigned int cxy )
     83{
     84    return hal_user_syscall( SYS_PLACE_FORK,
     85                             (reg_t)cxy, 0, 0, 0 );
     86}
     87
    8188/////////////////////////////////
    8289int utls( unsigned int operation,
     
    223230
    224231/////////////////////////////////////////////////
    225 int display_cluster_processes( unsigned int cxy )
     232int display_cluster_processes( unsigned int cxy,
     233                               unsigned int owned )
    226234{
    227235    return hal_user_syscall( SYS_DISPLAY,
    228236                             DISPLAY_CLUSTER_PROCESSES,
    229                              (reg_t)cxy, 0, 0 );
     237                             (reg_t)cxy,
     238                             (reg_t)owned, 0 );
    230239}
    231240
     
    304313                   "t : display on TXT0 process decriptors attached to TXT[tid]\n"
    305314                   "b : display on TXT0 busylocks taken by thread[pid,trdid]\n"
     315                   "q : display on TXT0 DQDT state\n"
    306316                   "y : activate/desactivate trace for core[cxy,lid]\n"
    307317                   "x : force calling process to exit\n"
     
    313323            printf("p / cxy = ");
    314324            cxy = get_uint32();
    315             display_cluster_processes( cxy );
     325            display_cluster_processes( cxy , 0 );
    316326        }
    317327        else if( cmd == 's' )
     
    336346            txt = get_uint32();
    337347            display_txt_processes( txt );
     348        }
     349        else if( cmd == 'q' )
     350        {
     351            printf("q\n");
     352            display_dqdt();
    338353        }
    339354        else if( cmd == 'y' )
  • trunk/libs/libalmosmkh/almosmkh.h

    r580 r589  
    3939
    4040/***************************************************************************************
    41  * This function is used to give the process identified by the <pid> argument the
    42  * exclusive ownership of its TXT terminal.
     41 * This syscall gives the process identified by the <pid> argument the exclusive
     42 * ownership of its TXT terminal.
    4343 ***************************************************************************************
    4444 * @ pid        : process identifier.
     
    4848
    4949/***************************************************************************************
    50  * This function stores in the buffer identified by the <owner> argument a non zero
     50 * This syscall stores in the buffer identified by the <owner> argument a non zero
    5151 * value when the process identified by the <pid> argument is currently the exclusive
    5252 * owner of its TXT terminal.
     
    6060
    6161/***************************************************************************************
    62  * This function returns the hardware platform parameters.
     62 * This syscall returns the hardware platform parameters.
    6363 ***************************************************************************************
    6464 * @ x_size   : [out] number of clusters in a row.
     
    7272
    7373/***************************************************************************************
    74  * This function returns the cluster an local index for the calling core.
     74 * This syscall returns the cluster an local index for the calling core.
    7575 ***************************************************************************************
    7676 * @ cxy      : [out] cluster identifier.
     
    9090int get_cycle( unsigned long long * cycle );
    9191
    92 /***************************************************************************************
    93  * This function implement the operations related to User Thread Local Storage.
     92/***************************************************************************************
     93 * This syscall allows the calling thread to specify the target cluster for
     94 * a subsequent fork(). It must be called for each fork().
     95 ***************************************************************************************
     96 * @ cxy      : [in] target cluster identifier.
     97 * @ return 0 if success / returns -1 if illegal cxy argument.
     98 **************************************************************************************/
     99int place_fork( unsigned int cxy );
     100
     101/***************************************************************************************
     102 * This syscall implements the operations related to User Thread Local Storage.
    94103 ***************************************************************************************
    95104 * @ operation  : UTLS operation type as defined in "shared_sycalls.h" file.
     
    101110
    102111/***************************************************************************************
    103  * This function returns an unsigned 32 bits integer from the standard "stdin" stream.
     112 * This syscall returns an unsigned 32 bits integer from the standard "stdin" stream.
    104113 * Both decimal numbers and hexadecimal numbers (prefixed by 0x) are supported.
    105114 ***************************************************************************************
    106115 * returns the integer value if success / returns -1 if failure.
    107116 **************************************************************************************/
    108 unsigned int getint32( void );
     117unsigned int get_uint32( void );
    109118
    110119
     
    113122
    114123/***************************************************************************************
    115  * This debug function displays on the kernel terminal TXT0
     124 * This debug syscall displays on the kernel terminal TXT0
    116125 * the thread / process / core identifiers, the current cycle, plus a user defined
    117126 * message as specified by the <string> argument.
     
    132141
    133142/***************************************************************************************
    134  * This debug function displays on the kernel terminal TXT0
     143 * This debug syscall displays on the kernel terminal TXT0
    135144 * the state of the core scheduler identified by the <cxy> and <lid> arguments.
    136145 * It can be called by any thread running in any cluster.
     
    144153
    145154/***************************************************************************************
    146  * This debug function displays on the kernel terminal TXT0
     155 * This debug syscall displays on the kernel terminal TXT0
    147156 * the list of process registered in a given cluster identified by the <cxy> argument.
     157 * Only the owned processes are displayed when the <owned> argument is non zero.
    148158 * It can be called by any thread running in any cluster.
    149159 ***************************************************************************************
    150160 * @ cxy      : [in] target cluster identifier.
     161 * @ owned    : [in] only owned processes if non zero.
    151162 * @ return 0 if success / return -1 if illegal argument.
    152163 **************************************************************************************/
    153 int display_cluster_processes( unsigned int  cxy );
    154 
    155 /***************************************************************************************
    156  * This debug function displays on the kernel terminal TXT0
     164int display_cluster_processes( unsigned int  cxy,
     165                               unsigned int  owned );
     166
     167/***************************************************************************************
     168 * This debug syscall displays on the kernel terminal TXT0
    157169 * the list of processes attached to a given TXT channel.
    158170 * It can be called by any thread running in any cluster.
     
    164176
    165177/***************************************************************************************
    166  * This debug function displays on the kernel terminal TXT0
     178 * This debug syscall displays on the kernel terminal TXT0
    167179 * the list of channel devices available in the architecture.
    168180 * It can be called by any thread running in any cluster.
     
    173185
    174186/***************************************************************************************
    175  * This debug function displays on the kernel terminal TXT0
     187 * This debug syscall displays on the kernel terminal TXT0
    176188 * the list of channel device or pseudo-files registered in the VFS cache.
    177189 * It can be called by any thread running in any cluster.
     
    182194
    183195/***************************************************************************************
    184  * This debug function displays on the kernel terminal TXT0 the current DQDT state.
     196 * This debug syscall displays on the kernel terminal TXT0 the current DQDT state.
    185197 * It can be called by any thread running in any cluster.
    186198 ***************************************************************************************
     
    190202
    191203/*****************************************************************************************
    192 * This debug function is used to activate / desactivate the context switches trace
     204* This debug syscall is used to activate / desactivate the context switches trace
    193205* for a core identified by the <cxy> and <lid> arguments.
    194206* It can be called by any thread running in any cluster.
     
    204216
    205217/****************************************************************************************
    206  * This blocking function implements an user-level interactive debugger that can be
     218 * This syscall implements an user-level interactive debugger that can be
    207219 * introduced in any user application to display various kernel distributed structures.
    208220 * The supported commands are:
Note: See TracChangeset for help on using the changeset viewer.