Ignore:
Timestamp:
May 3, 2018, 5:51:22 PM (4 years ago)
Author:
alain
Message:

1/ Fix a bug in the Multithreaded "sort" applicationr:
The pthread_create() arguments must be declared as global variables.
2/ The exit syscall can be called by any thread of a process..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/drivers/soclib_tty.c

    r438 r440  
    137137#endif
    138138
    139     // get TXT device pointers
    140     xptr_t    dev_xp = (xptr_t)hal_remote_lwd( XPTR( th_cxy , &th_ptr->txt_cmd.dev_xp ) );
    141     cxy_t     dev_cxy = GET_CXY( dev_xp );
    142     chdev_t * dev_ptr = GET_PTR( dev_xp );
    143 
    144     // get extended pointer on SOCLIB_TTY base segment
    145     xptr_t tty_xp = (xptr_t)hal_remote_lwd( XPTR( dev_cxy , &dev_ptr->base ) );
    146 
    147     // get SOCLIB_TTY base segment cluster and local pointer
     139    // get TXT device cluster and pointers
     140    xptr_t     dev_xp = (xptr_t)hal_remote_lwd( XPTR( th_cxy , &th_ptr->txt_cmd.dev_xp ) );
     141    cxy_t      dev_cxy = GET_CXY( dev_xp );
     142    chdev_t  * dev_ptr = GET_PTR( dev_xp );
     143
     144    // get cluster and pointers for SOCLIB_TTY peripheral base segment
     145    xptr_t     tty_xp = (xptr_t)hal_remote_lwd( XPTR( dev_cxy , &dev_ptr->base ) );
    148146    cxy_t      tty_cxy = GET_CXY( tty_xp );
    149147    uint32_t * tty_ptr = GET_PTR( tty_xp );
     
    346344                owner_pid = hal_remote_lw( XPTR( owner_cxy , &owner_ptr->pid ) );
    347345
    348                 // block owner process only if it is not a KSH
     346                // block owner process only if it is not INIT or KSH
    349347                if( process_get_ppid( owner_xp ) > 1 )
    350348                {
     
    362360            if( byte == 0x03 )
    363361            {
    364                 // get pointers on TXT owner process in owner cluster
     362                // get pointer on TXT owner process in owner cluster
    365363                owner_xp  = process_txt_get_owner( channel );
    366364
     
    380378                    process_txt_detach( owner_xp );
    381379
    382                     // mark for delete all processes in all clusters, but the main
     380                    // mark for delete all thread in all clusters, but the main
    383381                    process_sigaction( owner_pid , DELETE_ALL_THREADS );
    384382               
Note: See TracChangeset for help on using the changeset viewer.