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

Improve signals.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/cluster.c

    r582 r583  
    272272////////////////////////////////////////////////////////////////////////////////////
    273273
    274 /////////////////////////////////
     274///////////////////////////////////////
    275275lid_t cluster_select_local_core( void )
    276276{
     
    680680}  // end cluster_process_copies_unlink()
    681681
    682 ///////////////////////////////////////////
    683 void cluster_processes_display( cxy_t cxy )
     682////////////////////////////////////////////
     683void cluster_processes_display( cxy_t   cxy,
     684                                bool_t  owned )
    684685{
    685686    xptr_t        root_xp;
     
    687688    xptr_t        iter_xp;
    688689    xptr_t        process_xp;
     690    process_t   * process_ptr;
     691    cxy_t         process_cxy;
     692    pid_t         pid;
    689693    cxy_t         txt0_cxy;
    690694    chdev_t     * txt0_ptr;
     
    692696    xptr_t        txt0_lock_xp;
    693697
    694     assert( (cluster_is_undefined( cxy ) == false),
    695     "illegal cluster index" );
     698assert( (cluster_is_undefined( cxy ) == false), "illegal cluster index" );
    696699
    697700    // get extended pointer on root and lock for local process list in cluster
     
    720723    XLIST_FOREACH( root_xp , iter_xp )
    721724    {
    722         process_xp = XLIST_ELEMENT( iter_xp , process_t , local_list );
    723         process_display( process_xp );
     725        process_xp  = XLIST_ELEMENT( iter_xp , process_t , local_list );
     726        process_ptr = GET_PTR( process_xp );
     727        process_cxy = GET_CXY( process_xp );
     728
     729        // get process PID
     730        pid = hal_remote_l32( XPTR( process_cxy , &process_ptr->pid ) );
     731
     732        if( owned )  // display only user & owned processes
     733        {
     734            if( (CXY_FROM_PID( pid ) == cxy) && (LPID_FROM_PID( pid ) != 0) )
     735            {
     736                process_display( process_xp );
     737            }
     738        }
     739        else         // display all local processes
     740        {
     741            process_display( process_xp );
     742        }
    724743    }
    725744
Note: See TracChangeset for help on using the changeset viewer.