Ignore:
Timestamp:
Jul 12, 2017, 8:12:41 PM (7 years ago)
Author:
alain
Message:

Redefine the PIC device API.

File:
1 edited

Legend:

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

    r101 r188  
    537537                                  uint32_t       fs_type,    // in
    538538                                  uint32_t       inode_type, // in
     539                                  void         * extend,     // in
    539540                                  uint32_t       attr,       // in
    540541                                  uint32_t       rights,     // in
     
    560561    rpc.args[1] = (uint64_t)fs_type;
    561562    rpc.args[2] = (uint64_t)inode_type;
    562     rpc.args[3] = (uint64_t)attr;
    563     rpc.args[4] = (uint64_t)rights;
    564     rpc.args[5] = (uint64_t)uid;
    565     rpc.args[6] = (uint64_t)gid;
     563    rpc.args[3] = (uint64_t)(intptr_t)extend;
     564    rpc.args[4] = (uint64_t)attr;
     565    rpc.args[5] = (uint64_t)rights;
     566    rpc.args[6] = (uint64_t)uid;
     567    rpc.args[7] = (uint64_t)gid;
    566568
    567569    // register RPC request in remote RPC fifo (blocking function)
     
    569571
    570572    // get output values from RPC descriptor
    571     *inode_xp = (xptr_t)rpc.args[7];
    572     *error    = (error_t)rpc.args[8];
     573    *inode_xp = (xptr_t)rpc.args[8];
     574    *error    = (error_t)rpc.args[9];
    573575}
    574576
     
    579581    uint32_t         fs_type;
    580582    uint32_t         inode_type;
     583    void           * extend;
    581584    uint32_t         attr;
    582585    uint32_t         rights;
     
    591594
    592595    // get input arguments from client rpc descriptor
    593     dentry_xp  = (xptr_t)  hal_remote_lwd( XPTR( client_cxy , &desc->args[0] ) );
    594     fs_type    = (uint32_t)hal_remote_lwd( XPTR( client_cxy , &desc->args[1] ) );
    595     inode_type = (uint32_t)hal_remote_lwd( XPTR( client_cxy , &desc->args[2] ) );
    596     attr       = (uint32_t)hal_remote_lwd( XPTR( client_cxy , &desc->args[3] ) );
    597     rights     = (uint32_t)hal_remote_lwd( XPTR( client_cxy , &desc->args[4] ) );
    598     uid        = (uid_t)   hal_remote_lwd( XPTR( client_cxy , &desc->args[5] ) );
    599     gid        = (gid_t)   hal_remote_lwd( XPTR( client_cxy , &desc->args[6] ) );
     596    dentry_xp  = (xptr_t)          hal_remote_lwd( XPTR( client_cxy , &desc->args[0] ) );
     597    fs_type    = (uint32_t)        hal_remote_lwd( XPTR( client_cxy , &desc->args[1] ) );
     598    inode_type = (uint32_t)        hal_remote_lwd( XPTR( client_cxy , &desc->args[2] ) );
     599    extend     = (void *)(intptr_t)hal_remote_lwd( XPTR( client_cxy , &desc->args[3] ) );
     600    attr       = (uint32_t)        hal_remote_lwd( XPTR( client_cxy , &desc->args[4] ) );
     601    rights     = (uint32_t)        hal_remote_lwd( XPTR( client_cxy , &desc->args[5] ) );
     602    uid        = (uid_t)           hal_remote_lwd( XPTR( client_cxy , &desc->args[6] ) );
     603    gid        = (gid_t)           hal_remote_lwd( XPTR( client_cxy , &desc->args[7] ) );
    600604
    601605    // call local kernel function
     
    603607                              fs_type,
    604608                              inode_type,
     609                              extend,
    605610                              attr,
    606611                              rights,
     
    610615
    611616    // set output arguments
    612     hal_remote_swd( XPTR( client_cxy , &desc->args[7] ) , (uint64_t)inode_xp );
    613     hal_remote_swd( XPTR( client_cxy , &desc->args[8] ) , (uint64_t)error );
     617    hal_remote_swd( XPTR( client_cxy , &desc->args[8] ) , (uint64_t)inode_xp );
     618    hal_remote_swd( XPTR( client_cxy , &desc->args[9] ) , (uint64_t)error );
    614619}
    615620
     
    12901295                if( cores == 0 ) // no core in kernel mode in server
    12911296                {
    1292                     dev_icu_send_ipi( server_cxy , client_lid );
     1297                    dev_pic_send_ipi( server_cxy , client_lid );
    12931298
    12941299                    rpc_dmsg("\n[INFO] %s : core %d in cluster %x send IPI to core %d in cluster %x\n",
     
    14541459
    14551460        // update core descriptor counter 
    1456             core->rpc_threads++;
     1461            hal_atomic_add( &core->rpc_threads , 1 );
    14571462    }
    14581463
     
    15491554
    15501555            // update core descriptor counter
    1551                         this->core->rpc_threads--;
     1556                hal_atomic_add( &this->core->rpc_threads , -1 );
    15521557
    15531558            // suicide
Note: See TracChangeset for help on using the changeset viewer.