Ignore:
Timestamp:
Aug 13, 2018, 1:43:20 PM (6 years ago)
Author:
alain
Message:

Introduce the math library, to support the floating point
data used by the multi-thread fft application.
Fix several bugs regarding the FPU context save/restore.
Introduce support for the %f format in printf.

File:
1 edited

Legend:

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

    r457 r459  
    980980                                  error_t      * error )     // out
    981981{
     982#if DEBUG_RPC_VFS_INODE_CREATE
     983uint32_t cycle = (uint32_t)hal_get_cycles();
     984if( cycle > DEBUG_RPC_VFS_INODE_CREATE )
     985printk("\n[DBG] %s : thread %x enter on core[%x,%d] / cycle %d\n",
     986__FUNCTION__ , CURRENT_THREAD , local_cxy, CURRENT_THREAD->core->lid , cycle );
     987#endif
     988
    982989    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
    983990
     
    10051012    *error    = (error_t)rpc.args[9];
    10061013
     1014#if DEBUG_RPC_VFS_INODE_CREATE
     1015uint32_t cycle = (uint32_t)hal_get_cycles();
     1016if( cycle > DEBUG_RPC_VFS_INODE_CREATE )
     1017printk("\n[DBG] %s : thread %x exit on core[%x,%d] / cycle %d\n",
     1018__FUNCTION__ , CURRENT_THREAD , local_cxy, CURRENT_THREAD->core->lid , cycle );
     1019#endif
    10071020}
    10081021
     
    10101023void rpc_vfs_inode_create_server( xptr_t xp )
    10111024{
     1025#if DEBUG_RPC_VFS_INODE_CREATE
     1026uint32_t cycle = (uint32_t)hal_get_cycles();
     1027if( cycle > DEBUG_RPC_VFS_INODE_CREATE )
     1028printk("\n[DBG] %s : thread %x enter on core[%x,%d] / cycle %d\n",
     1029__FUNCTION__ , CURRENT_THREAD , local_cxy, CURRENT_THREAD->core->lid , cycle );
     1030#endif
     1031
    10121032    xptr_t           dentry_xp;
    10131033    uint32_t         fs_type;
     
    10501070    hal_remote_swd( XPTR( client_cxy , &desc->args[9] ) , (uint64_t)error );
    10511071
     1072#if DEBUG_RPC_VFS_INODE_CREATE
     1073uint32_t cycle = (uint32_t)hal_get_cycles();
     1074if( cycle > DEBUG_RPC_VFS_INODE_CREATE )
     1075printk("\n[DBG] %s : thread %x exit on core[%x,%d] / cycle %d\n",
     1076__FUNCTION__ , CURRENT_THREAD , local_cxy, CURRENT_THREAD->core->lid , cycle );
     1077#endif
    10521078}
    10531079
     
    10581084/////////////////////////////////////////////////////////////
    10591085void rpc_vfs_inode_destroy_client( cxy_t                cxy,
    1060                                    struct vfs_inode_s * inode )
    1061 {
     1086                                   struct vfs_inode_s * inode,
     1087                                   error_t            * error )
     1088{
     1089#if DEBUG_RPC_VFS_INODE_DESTROY
     1090uint32_t cycle = (uint32_t)hal_get_cycles();
     1091if( cycle > DEBUG_RPC_VFS_INODE_DESTROY )
     1092printk("\n[DBG] %s : thread %x enter on core[%x,%d] / cycle %d\n",
     1093__FUNCTION__ , CURRENT_THREAD , local_cxy, CURRENT_THREAD->core->lid , cycle );
     1094#endif
     1095
    10621096    assert( (cxy != local_cxy) , __FUNCTION__ , "target cluster is not remote\n");
    10631097
     
    10741108    rpc_send( cxy , &rpc );
    10751109
     1110#if DEBUG_RPC_VFS_INODE_DESTROY
     1111uint32_t cycle = (uint32_t)hal_get_cycles();
     1112if( cycle > DEBUG_RPC_VFS_INODE_DESTROY )
     1113printk("\n[DBG] %s : thread %x exit on core[%x,%d] / cycle %d\n",
     1114__FUNCTION__ , CURRENT_THREAD , local_cxy, CURRENT_THREAD->core->lid , cycle );
     1115#endif
    10761116}
    10771117
     
    10791119void rpc_vfs_inode_destroy_server( xptr_t xp )
    10801120{
     1121#if DEBUG_RPC_VFS_INODE_DESTROY
     1122uint32_t cycle = (uint32_t)hal_get_cycles();
     1123if( cycle > DEBUG_RPC_VFS_INODE_DESTROY )
     1124printk("\n[DBG] %s : thread %x enter on core[%x,%d] / cycle %d\n",
     1125__FUNCTION__ , CURRENT_THREAD , local_cxy, CURRENT_THREAD->core->lid , cycle );
     1126#endif
     1127
    10811128    vfs_inode_t * inode;
     1129    error_t       error;
    10821130
    10831131    // get client cluster identifier and pointer on RPC descriptor
     
    10891137                       
    10901138    // call local kernel function
    1091     vfs_inode_destroy( inode );
    1092 
     1139    error = vfs_inode_destroy( inode );
     1140
     1141    // set output argument
     1142    hal_remote_swd( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)error );
     1143
     1144#if DEBUG_RPC_VFS_INODE_DESTROY
     1145uint32_t cycle = (uint32_t)hal_get_cycles();
     1146if( cycle > DEBUG_RPC_VFS_INODE_DESTROY )
     1147printk("\n[DBG] %s : thread %x exit on core[%x,%d] / cycle %d\n",
     1148__FUNCTION__ , CURRENT_THREAD , local_cxy, CURRENT_THREAD->core->lid , cycle );
     1149#endif
    10931150}
    10941151
     
    11941251///////////////////////////////////////////////////////
    11951252void rpc_vfs_dentry_destroy_client( cxy_t          cxy,
    1196                                     vfs_dentry_t * dentry )
     1253                                    vfs_dentry_t * dentry,
     1254                                    error_t      * error )
    11971255{
    11981256#if DEBUG_RPC_VFS_DENTRY_DESTROY
     
    12361294
    12371295    vfs_dentry_t * dentry;
     1296    error_t        error;
    12381297
    12391298    // get client cluster identifier and pointer on RPC descriptor
     
    12451304                       
    12461305    // call local kernel function
    1247     vfs_dentry_destroy( dentry );
     1306    error = vfs_dentry_destroy( dentry );
     1307
     1308    // set output argument
     1309    hal_remote_swd( XPTR( client_cxy , &desc->args[1] ) , (uint64_t)error );
    12481310
    12491311#if DEBUG_RPC_VFS_DENTRY_DESTROY
Note: See TracChangeset for help on using the changeset viewer.