Changeset 313 for trunk/kernel/vfs
- Timestamp:
- Aug 2, 2017, 3:24:57 PM (7 years ago)
- Location:
- trunk/kernel/vfs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/vfs/vfs.c
r296 r313 662 662 } // end vfs_open() 663 663 664 ///////////////////////////////////// 665 error_t vfs_move( bool_t to_buffer, 666 bool_t is_user, 667 xptr_t file_xp, 668 void * buffer, 669 uint32_t size ) 664 ////////////////////////////////////////// 665 error_t vfs_user_move( bool_t to_buffer, 666 xptr_t file_xp, 667 void * buffer, 668 uint32_t size ) 670 669 { 671 670 assert( ( file_xp != XPTR_NULL ) , __FUNCTION__ , "file_xp == XPTR_NULL" ); … … 695 694 if( file_cxy == local_cxy ) 696 695 { 697 error = mapper_move_buffer( mapper, 698 to_buffer, 699 is_user, 700 file_offset, 701 buffer, 702 size ); 696 error = mapper_move_user( mapper, 697 to_buffer, 698 file_offset, 699 buffer, 700 size ); 703 701 } 704 702 else 705 703 { 706 rpc_mapper_move_ buffer_client( file_cxy,707 708 709 is_user,710 711 712 713 704 rpc_mapper_move_user_client( file_cxy, 705 mapper, 706 to_buffer, 707 true, // user buffer 708 file_offset, 709 (uint64_t)(intptr_t)buffer, 710 size, 711 &error ); 714 712 } 715 713 … … 722 720 return -1; 723 721 } 724 } // end vfs_ move()722 } // end vfs_user_move() 725 723 726 724 ////////////////////////////////////// -
trunk/kernel/vfs/vfs.h
r296 r313 732 732 733 733 /****************************************************************************************** 734 * This function moves <size> bytes between the file identified by the open file descriptor735 * <file_xp> a nd a local kernel or user <buffer>, as defined by the <is_user> argument,736 * a nd taken into account the offset in <file_xp>.737 * Th e transfer direction is defined by the <to_buffer> argument.734 * This function moves <size> bytes between a remote file mapper, identified by the 735 * <file_xp> argument, and a - possibly distributed - user space <buffer>, taken into 736 * account the offset in <file_xp>. The transfer direction is defined by <to_buffer>. 737 * This function is called by the sys_read() and sys_write() system calls. 738 738 ****************************************************************************************** 739 739 * @ to_buffer : mapper -> buffer if true / buffer -> mapper if false. 740 * @ is_user : user space buffer if true / local kernel buffer if false.741 740 * @ file_xp : extended pointer on the remote file descriptor. 742 * @ buffer : local pointer on buffer.741 * @ buffer : user space pointer on buffer (can be physically distributed). 743 742 * @ size : requested number of bytes from offset. 744 743 * @ returns number of bytes actually transfered / -1 if error. 745 744 *****************************************************************************************/ 746 error_t vfs_move( bool_t to_buffer, 747 bool_t is_user, 748 xptr_t file_xp, 749 void * buffer, 750 uint32_t size ); 745 error_t vfs_user_move( bool_t to_buffer, 746 xptr_t file_xp, 747 void * buffer, 748 uint32_t size ); 751 749 752 750 /******************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.