Skip to content

Commit

Permalink
Add ckb_load_extension syscall (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson authored Jul 25, 2023
1 parent 4615461 commit 597399e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions ckb_consts.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define SYS_ckb_spawn 2101
#define SYS_ckb_get_memory_limit 2102
#define SYS_ckb_set_content 2103
#define SYS_ckb_load_extension 2104
#define SYS_ckb_current_memory 2105

#define CKB_SUCCESS 0
Expand Down
5 changes: 5 additions & 0 deletions ckb_syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,11 @@ int ckb_current_memory() {
return syscall(SYS_ckb_current_memory, 0, 0, 0, 0, 0, 0);
}

int ckb_load_extension(void* addr, uint64_t* len, size_t offset, size_t index, size_t source)
{
return syscall(SYS_ckb_load_extension, addr, len, offset, index, source, 0);
}

#endif /* CKB_STDLIB_NO_SYSCALL_IMPL */

#endif /* CKB_C_STDLIB_CKB_SYSCALLS_H_ */

0 comments on commit 597399e

Please sign in to comment.