@@ -544,14 +544,13 @@ pub use crate::syscalls::internal::SpawnArgs;
544544/// The parent process calls the Spawn system call, which creates a new process (a child process) that is an
545545/// independent ckb-vm instance. It's important to note that the parent process will not be blocked by the child
546546/// process as a result of this syscall.
547- /// Note: available after ckb 2nd hardfork.
548547///
549548/// # Arguments
550549///
551550/// * `index`, `source`, `bounds` and `place` - same as exec.
552551/// * `spgs` - spawn arguments.
553552///
554- /// Returns success or a syscall error.
553+ /// Returns process id or a syscall error.
555554///
556555/// # Scheduler Algorithm V1
557556///
@@ -624,7 +623,6 @@ pub fn spawn(
624623}
625624
626625/// The syscall pauses until the execution of a process specified by pid has ended.
627- /// Note: available after ckb 2nd hardfork.
628626///
629627/// # Arguments
630628///
@@ -642,14 +640,12 @@ pub fn wait(pid: u64) -> Result<i8, SysError> {
642640}
643641
644642/// This syscall is used to get the current process id. Root process ID is 0.
645- /// Note: available after ckb 2nd hardfork.
646643pub fn process_id ( ) -> u64 {
647644 unsafe { syscall ( 0 , 0 , 0 , 0 , 0 , 0 , SYS_PROCESS_ID ) }
648645}
649646
650647/// This syscall create a pipe with read-write pair of file descriptions. The file descriptor with read permission is
651648/// located at fds[0], and the corresponding file descriptor with write permission is located at fds[1].
652- /// Note: available after ckb 2nd hardfork.
653649pub fn pipe ( ) -> Result < ( u64 , u64 ) , SysError > {
654650 let mut fds: [ u64 ; 2 ] = [ 0 , 0 ] ;
655651 let ret = unsafe { syscall ( fds. as_mut_ptr ( ) as u64 , 0 , 0 , 0 , 0 , 0 , SYS_PIPE ) } ;
@@ -662,7 +658,6 @@ pub fn pipe() -> Result<(u64, u64), SysError> {
662658
663659/// This syscall reads data from a pipe via a file descriptor. The syscall Read attempts to read up to value pointed by
664660/// length bytes from file descriptor fd into the buffer, and the actual length of data read is returned.
665- /// Note: available after ckb 2nd hardfork.
666661pub fn read ( fd : u64 , buffer : & mut [ u8 ] ) -> Result < usize , SysError > {
667662 let mut l: u64 = buffer. len ( ) as u64 ;
668663 let ret = unsafe {
@@ -690,8 +685,6 @@ pub fn read(fd: u64, buffer: &mut [u8]) -> Result<usize, SysError> {
690685///
691686/// If buffer is empty and fd is avaliable, then write() can still succeed: A data with a length of 0 is written to the
692687/// pipe. The peer needs to use a read() syscall to consume the empty data, and read() will returns Ok(0).
693- ///
694- /// Note: available after ckb 2nd hardfork.
695688pub fn write ( fd : u64 , buffer : & [ u8 ] ) -> Result < usize , SysError > {
696689 let mut l: u64 = buffer. len ( ) as u64 ;
697690 let ret = unsafe {
@@ -716,7 +709,6 @@ pub fn write(fd: u64, buffer: &[u8]) -> Result<usize, SysError> {
716709
717710/// This syscall retrieves the file descriptors available to the current process, which are passed in from the parent
718711/// process. These results are copied from the inherited_fds parameter of the Spawn syscall.
719- /// Note: available after ckb 2nd hardfork.
720712pub fn inherited_fds ( fds : & mut [ u64 ] ) -> u64 {
721713 let mut l: u64 = fds. len ( ) as u64 ;
722714 unsafe {
@@ -735,7 +727,6 @@ pub fn inherited_fds(fds: &mut [u64]) -> u64 {
735727
736728/// This syscall manually closes a file descriptor. After calling this, any attempt to read/write the file descriptor
737729/// pointed to the other end would fail.
738- /// Note: available after ckb 2nd hardfork.
739730pub fn close ( fd : u64 ) -> Result < ( ) , SysError > {
740731 let ret = unsafe { syscall ( fd, 0 , 0 , 0 , 0 , 0 , SYS_CLOSE ) } ;
741732 match ret {
@@ -754,8 +745,6 @@ pub fn close(fd: u64) -> Result<(), SysError> {
754745/// * `offset` - offset
755746/// * `index` - index of cell
756747/// * `source` - source of cell
757- ///
758- /// Note: available after ckb 2nd hardfork.
759748pub fn load_block_extension (
760749 buf : & mut [ u8 ] ,
761750 offset : usize ,
0 commit comments