1 /* 2 * Copyright 2004-2008, Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _SYSTEM_SYSCALLS_H 6 #define _SYSTEM_SYSCALLS_H 7 8 9 #include <arch_config.h> 10 #include <image.h> 11 #include <OS.h> 12 #include <DiskDeviceDefs.h> 13 14 #include <signal.h> 15 #include <sys/socket.h> 16 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 struct dirent; 23 struct fd_info; 24 struct fd_set; 25 struct fs_info; 26 struct iovec; 27 struct net_stat; 28 struct pollfd; 29 struct rlimit; 30 struct sigaction; 31 struct stat; 32 struct _sem_t; 33 struct sembuf; 34 union semun; 35 36 struct disk_device_job_progress_info; 37 struct partitionable_space_data; 38 struct thread_creation_attributes; 39 struct user_disk_device_data; 40 struct user_disk_device_job_info; 41 struct user_disk_system_info; 42 43 // This marks the beginning of the syscalls prototypes for gensyscallinfos. 44 // NOTE: 45 // * Nothing but those prototypes may live here. 46 // * The arguments of the functions must be named to be processed properly. 47 48 #ifdef GEN_SYSCALL_INFOS_PROCESSING 49 #pragma syscalls begin 50 #endif 51 52 extern int _kern_is_computer_on(void); 53 extern status_t _kern_generic_syscall(const char *subsystem, uint32 function, 54 void *buffer, size_t bufferSize); 55 56 extern int _kern_getrlimit(int resource, struct rlimit * rlp); 57 extern int _kern_setrlimit(int resource, const struct rlimit * rlp); 58 59 extern status_t _kern_shutdown(bool reboot); 60 extern status_t _kern_get_safemode_option(const char *parameter, 61 char *buffer, size_t *_bufferSize); 62 63 extern ssize_t _kern_wait_for_objects(object_wait_info* infos, int numInfos, 64 uint32 flags, bigtime_t timeout); 65 66 /* sem functions */ 67 extern sem_id _kern_create_sem(int count, const char *name); 68 extern status_t _kern_delete_sem(sem_id id); 69 extern status_t _kern_switch_sem(sem_id releaseSem, sem_id id); 70 extern status_t _kern_switch_sem_etc(sem_id releaseSem, sem_id id, 71 uint32 count, uint32 flags, bigtime_t timeout); 72 extern status_t _kern_acquire_sem(sem_id id); 73 extern status_t _kern_acquire_sem_etc(sem_id id, uint32 count, uint32 flags, 74 bigtime_t timeout); 75 extern status_t _kern_release_sem(sem_id id); 76 extern status_t _kern_release_sem_etc(sem_id id, uint32 count, uint32 flags); 77 extern status_t _kern_get_sem_count(sem_id id, int32* thread_count); 78 extern status_t _kern_get_sem_info(sem_id semaphore, struct sem_info *info, 79 size_t size); 80 extern status_t _kern_get_next_sem_info(team_id team, int32 *cookie, 81 struct sem_info *info, size_t size); 82 extern status_t _kern_set_sem_owner(sem_id id, team_id proc); 83 84 /* POSIX realtime sem syscalls */ 85 extern status_t _kern_realtime_sem_open(const char* name, 86 int openFlagsOrShared, mode_t mode, uint32 semCount, 87 struct _sem_t* userSem, struct _sem_t** _usedUserSem); 88 extern status_t _kern_realtime_sem_close(sem_id semID, 89 struct _sem_t** _deleteUserSem); 90 extern status_t _kern_realtime_sem_unlink(const char* name); 91 92 extern status_t _kern_realtime_sem_get_value(sem_id semID, int* value); 93 extern status_t _kern_realtime_sem_post(sem_id semID); 94 extern status_t _kern_realtime_sem_wait(sem_id semID, bigtime_t timeout); 95 96 /* POSIX XSI semaphore syscalls */ 97 extern int _kern_xsi_semget(key_t key, int numSems, int flags); 98 extern int _kern_xsi_semctl(int semID, int semNumber, int command, 99 union semun* args); 100 extern status_t _kern_xsi_semop(int semID, struct sembuf *semOps, 101 size_t numSemOps); 102 103 /* team & thread syscalls */ 104 extern thread_id _kern_load_image(const char* const* flatArgs, 105 size_t flatArgsSize, int32 argCount, int32 envCount, 106 int32 priority, uint32 flags, port_id errorPort, 107 uint32 errorToken); 108 extern void _kern_exit_team(status_t returnValue); 109 extern status_t _kern_kill_team(team_id team); 110 extern team_id _kern_get_current_team(); 111 extern status_t _kern_wait_for_team(team_id team, status_t *_returnCode); 112 extern thread_id _kern_wait_for_child(thread_id child, uint32 flags, 113 int32 *_reason, status_t *_returnCode); 114 extern status_t _kern_exec(const char *path, const char* const* flatArgs, 115 size_t flatArgsSize, int32 argCount, int32 envCount); 116 extern thread_id _kern_fork(void); 117 extern pid_t _kern_process_info(pid_t process, int32 which); 118 extern pid_t _kern_setpgid(pid_t process, pid_t group); 119 extern pid_t _kern_setsid(void); 120 extern status_t _kern_change_root(const char *path); 121 122 extern thread_id _kern_spawn_thread( 123 struct thread_creation_attributes* attributes); 124 extern thread_id _kern_find_thread(const char *name); 125 extern status_t _kern_suspend_thread(thread_id thread); 126 extern status_t _kern_resume_thread(thread_id thread); 127 extern status_t _kern_rename_thread(thread_id thread, const char *newName); 128 extern status_t _kern_set_thread_priority(thread_id thread, int32 newPriority); 129 extern status_t _kern_kill_thread(thread_id thread); 130 extern void _kern_exit_thread(status_t returnValue); 131 extern void _kern_thread_yield(void); 132 extern status_t _kern_wait_for_thread(thread_id thread, status_t *_returnCode); 133 extern bool _kern_has_data(thread_id thread); 134 extern status_t _kern_send_data(thread_id thread, int32 code, const void *buffer, size_t bufferSize); 135 extern int32 _kern_receive_data(thread_id *_sender, void *buffer, size_t bufferSize); 136 extern int64 _kern_restore_signal_frame(); 137 138 extern status_t _kern_get_thread_info(thread_id id, thread_info *info); 139 extern status_t _kern_get_next_thread_info(team_id team, int32 *cookie, thread_info *info); 140 extern status_t _kern_get_team_info(team_id id, team_info *info); 141 extern status_t _kern_get_next_team_info(int32 *cookie, team_info *info); 142 extern status_t _kern_get_team_usage_info(team_id team, int32 who, team_usage_info *info, size_t size); 143 144 extern status_t _kern_block_thread(uint32 flags, bigtime_t timeout); 145 extern status_t _kern_unblock_thread(thread_id thread, status_t status); 146 extern status_t _kern_unblock_threads(thread_id* threads, uint32 count, 147 status_t status); 148 149 // user/group functions 150 extern gid_t _kern_getgid(bool effective); 151 extern uid_t _kern_getuid(bool effective); 152 extern status_t _kern_setregid(gid_t rgid, gid_t egid, 153 bool setAllIfPrivileged); 154 extern status_t _kern_setreuid(uid_t ruid, uid_t euid, 155 bool setAllIfPrivileged); 156 extern ssize_t _kern_getgroups(int groupCount, gid_t* groupList); 157 extern status_t _kern_setgroups(int groupCount, const gid_t* groupList); 158 159 // signal functions 160 extern status_t _kern_send_signal(pid_t tid, uint sig); 161 extern status_t _kern_sigprocmask(int how, const sigset_t *set, 162 sigset_t *oldSet); 163 extern status_t _kern_sigaction(int sig, const struct sigaction *action, 164 struct sigaction *oldAction); 165 extern bigtime_t _kern_set_alarm(bigtime_t time, uint32 mode); 166 extern status_t _kern_sigwait(const sigset_t *set, int *_signal); 167 extern status_t _kern_sigsuspend(const sigset_t *mask); 168 extern status_t _kern_sigpending(sigset_t *set); 169 extern status_t _kern_set_signal_stack(const stack_t *newStack, 170 stack_t *oldStack); 171 172 // image functions 173 extern image_id _kern_register_image(image_info *info, size_t size); 174 extern status_t _kern_unregister_image(image_id id); 175 extern void _kern_image_relocated(image_id id); 176 extern void _kern_loading_app_failed(status_t error); 177 extern status_t _kern_get_image_info(image_id id, image_info *info, size_t size); 178 extern status_t _kern_get_next_image_info(team_id team, int32 *cookie, image_info *info, size_t size); 179 180 // VFS functions 181 extern dev_t _kern_mount(const char *path, const char *device, 182 const char *fs_name, uint32 flags, const char *args, size_t argsLength); 183 extern status_t _kern_unmount(const char *path, uint32 flags); 184 extern status_t _kern_read_fs_info(dev_t device, struct fs_info *info); 185 extern status_t _kern_write_fs_info(dev_t device, const struct fs_info *info, int mask); 186 extern dev_t _kern_next_device(int32 *_cookie); 187 extern status_t _kern_sync(void); 188 extern status_t _kern_entry_ref_to_path(dev_t device, ino_t inode, 189 const char *leaf, char *userPath, size_t pathLength); 190 extern status_t _kern_normalize_path(const char* userPath, 191 bool traverseLink, char* buffer); 192 extern int _kern_open_entry_ref(dev_t device, ino_t inode, const char *name, int openMode, int perms); 193 extern int _kern_open(int fd, const char *path, int openMode, int perms); 194 extern int _kern_open_dir_entry_ref(dev_t device, ino_t inode, const char *name); 195 extern int _kern_open_dir(int fd, const char *path); 196 extern int _kern_open_parent_dir(int fd, char *name, 197 size_t nameLength); 198 extern status_t _kern_fcntl(int fd, int op, uint32 argument); 199 extern status_t _kern_fsync(int fd); 200 extern status_t _kern_flock(int fd, int op); 201 extern off_t _kern_seek(int fd, off_t pos, int seekType); 202 extern status_t _kern_create_dir_entry_ref(dev_t device, ino_t inode, const char *name, int perms); 203 extern status_t _kern_create_dir(int fd, const char *path, int perms); 204 extern status_t _kern_remove_dir(int fd, const char *path); 205 extern status_t _kern_read_link(int fd, const char *path, char *buffer, 206 size_t *_bufferSize); 207 extern status_t _kern_create_symlink(int fd, const char *path, 208 const char *toPath, int mode); 209 extern status_t _kern_create_link(const char *path, const char *toPath); 210 extern status_t _kern_unlink(int fd, const char *path); 211 extern status_t _kern_rename(int oldDir, const char *oldpath, int newDir, 212 const char *newpath); 213 extern status_t _kern_create_fifo(const char *path, mode_t perms); 214 extern status_t _kern_create_pipe(int *fds); 215 extern status_t _kern_access(const char *path, int mode); 216 extern ssize_t _kern_select(int numfds, struct fd_set *readSet, 217 struct fd_set *writeSet, struct fd_set *errorSet, 218 bigtime_t timeout, const sigset_t *sigMask); 219 extern ssize_t _kern_poll(struct pollfd *fds, int numfds, bigtime_t timeout); 220 extern int _kern_open_attr_dir(int fd, const char *path); 221 extern int _kern_create_attr(int fd, const char *name, uint32 type, int openMode); 222 extern int _kern_open_attr(int fd, const char *name, int openMode); 223 extern status_t _kern_remove_attr(int fd, const char *name); 224 extern status_t _kern_rename_attr(int fromFile, const char *fromName, int toFile, const char *toName); 225 extern int _kern_open_index_dir(dev_t device); 226 extern status_t _kern_create_index(dev_t device, const char *name, uint32 type, uint32 flags); 227 extern status_t _kern_read_index_stat(dev_t device, const char *name, struct stat *stat); 228 extern status_t _kern_remove_index(dev_t device, const char *name); 229 extern status_t _kern_getcwd(char *buffer, size_t size); 230 extern status_t _kern_setcwd(int fd, const char *path); 231 extern int _kern_open_query(dev_t device, const char *query, size_t queryLength, 232 uint32 flags, port_id port, int32 token); 233 234 // file descriptor functions 235 extern ssize_t _kern_read(int fd, off_t pos, void *buffer, size_t bufferSize); 236 extern ssize_t _kern_readv(int fd, off_t pos, const struct iovec *vecs, size_t count); 237 extern ssize_t _kern_write(int fd, off_t pos, const void *buffer, size_t bufferSize); 238 extern ssize_t _kern_writev(int fd, off_t pos, const struct iovec *vecs, 239 size_t count); 240 extern status_t _kern_ioctl(int fd, ulong cmd, void *data, size_t length); 241 extern ssize_t _kern_read_dir(int fd, struct dirent *buffer, size_t bufferSize, 242 uint32 maxCount); 243 extern status_t _kern_rewind_dir(int fd); 244 extern status_t _kern_read_stat(int fd, const char *path, bool traverseLink, 245 struct stat *stat, size_t statSize); 246 extern status_t _kern_write_stat(int fd, const char *path, 247 bool traverseLink, const struct stat *stat, 248 size_t statSize, int statMask); 249 extern status_t _kern_close(int fd); 250 extern int _kern_dup(int fd); 251 extern int _kern_dup2(int ofd, int nfd); 252 extern status_t _kern_lock_node(int fd); 253 extern status_t _kern_unlock_node(int fd); 254 extern status_t _kern_get_next_fd_info(team_id team, uint32 *_cookie, 255 struct fd_info *info, size_t infoSize); 256 257 // socket functions 258 extern int _kern_socket(int family, int type, int protocol); 259 extern status_t _kern_bind(int socket, const struct sockaddr *address, 260 socklen_t addressLength); 261 extern status_t _kern_shutdown_socket(int socket, int how); 262 extern status_t _kern_connect(int socket, const struct sockaddr *address, 263 socklen_t addressLength); 264 extern status_t _kern_listen(int socket, int backlog); 265 extern int _kern_accept(int socket, struct sockaddr *address, 266 socklen_t *_addressLength); 267 extern ssize_t _kern_recv(int socket, void *data, size_t length, 268 int flags); 269 extern ssize_t _kern_recvfrom(int socket, void *data, size_t length, 270 int flags, struct sockaddr *address, 271 socklen_t *_addressLength); 272 extern ssize_t _kern_recvmsg(int socket, struct msghdr *message, 273 int flags); 274 extern ssize_t _kern_send(int socket, const void *data, size_t length, 275 int flags); 276 extern ssize_t _kern_sendto(int socket, const void *data, size_t length, 277 int flags, const struct sockaddr *address, 278 socklen_t addressLength); 279 extern ssize_t _kern_sendmsg(int socket, const struct msghdr *message, 280 int flags); 281 extern status_t _kern_getsockopt(int socket, int level, int option, 282 void *value, socklen_t *_length); 283 extern status_t _kern_setsockopt(int socket, int level, int option, 284 const void *value, socklen_t length); 285 extern status_t _kern_getpeername(int socket, struct sockaddr *address, 286 socklen_t *_addressLength); 287 extern status_t _kern_getsockname(int socket, struct sockaddr *address, 288 socklen_t *_addressLength); 289 extern int _kern_sockatmark(int socket); 290 extern status_t _kern_socketpair(int family, int type, int protocol, 291 int *socketVector); 292 extern status_t _kern_get_next_socket_stat(int family, uint32 *cookie, 293 struct net_stat *stat); 294 295 // node monitor functions 296 extern status_t _kern_stop_notifying(port_id port, uint32 token); 297 extern status_t _kern_start_watching(dev_t device, ino_t node, uint32 flags, 298 port_id port, uint32 token); 299 extern status_t _kern_stop_watching(dev_t device, ino_t node, port_id port, 300 uint32 token); 301 302 // time functions 303 extern status_t _kern_set_real_time_clock(uint32 time); 304 extern status_t _kern_set_timezone(int32 timezoneOffset, bool daylightSavingTime); 305 extern status_t _kern_get_timezone(int32 *_timezoneOffset, bool *_daylightSavingTime); 306 extern status_t _kern_set_tzfilename(const char *filename, size_t length, bool isGMT); 307 extern status_t _kern_get_tzfilename(char *filename, size_t length, bool *_isGMT); 308 309 extern bigtime_t _kern_system_time(); 310 extern status_t _kern_snooze_etc(bigtime_t time, int timebase, int32 flags); 311 312 // area functions 313 extern area_id _kern_create_area(const char *name, void **address, uint32 addressSpec, 314 size_t size, uint32 lock, uint32 protection); 315 extern status_t _kern_delete_area(area_id area); 316 extern area_id _kern_area_for(void *address); 317 extern area_id _kern_find_area(const char *name); 318 extern status_t _kern_get_area_info(area_id area, area_info *info); 319 extern status_t _kern_get_next_area_info(team_id team, int32 *cookie, area_info *info); 320 extern status_t _kern_resize_area(area_id area, size_t newSize); 321 extern area_id _kern_transfer_area(area_id area, void **_address, uint32 addressSpec, 322 team_id target); 323 extern status_t _kern_set_area_protection(area_id area, uint32 newProtection); 324 extern area_id _kern_clone_area(const char *name, void **_address, uint32 addressSpec, 325 uint32 protection, area_id sourceArea); 326 extern status_t _kern_reserve_heap_address_range(addr_t* _address, uint32 addressSpec, 327 addr_t size); 328 329 extern area_id _kern_map_file(const char *name, void **address, 330 int addressSpec, size_t size, int protection, 331 int mapping, int fd, off_t offset); 332 extern status_t _kern_unmap_memory(void *address, size_t size); 333 extern status_t _kern_set_memory_protection(void *address, size_t size, 334 int protection); 335 extern status_t _kern_sync_memory(void *address, size_t size, int flags); 336 extern status_t _kern_memory_advice(void *address, size_t size, 337 int advice); 338 339 /* kernel port functions */ 340 extern port_id _kern_create_port(int32 queue_length, const char *name); 341 extern status_t _kern_close_port(port_id id); 342 extern status_t _kern_delete_port(port_id id); 343 extern port_id _kern_find_port(const char *port_name); 344 extern status_t _kern_get_port_info(port_id id, struct port_info *info); 345 extern status_t _kern_get_next_port_info(team_id team, int32 *cookie, struct port_info *info); 346 extern ssize_t _kern_port_buffer_size_etc(port_id port, uint32 flags, bigtime_t timeout); 347 extern int32 _kern_port_count(port_id port); 348 extern ssize_t _kern_read_port_etc(port_id port, int32 *msgCode, void *msgBuffer, 349 size_t bufferSize, uint32 flags, bigtime_t timeout); 350 extern status_t _kern_set_port_owner(port_id port, team_id team); 351 extern status_t _kern_write_port_etc(port_id port, int32 msgCode, const void *msgBuffer, 352 size_t bufferSize, uint32 flags, bigtime_t timeout); 353 extern status_t _kern_writev_port_etc(port_id id, int32 msgCode, 354 const struct iovec *msgVecs, size_t vecCount, 355 size_t bufferSize, uint32 flags, bigtime_t timeout); 356 extern status_t _kern_get_port_message_info_etc(port_id port, 357 port_message_info *info, size_t infoSize, uint32 flags, 358 bigtime_t timeout); 359 360 // debug support functions 361 extern void _kern_debugger(const char *message); 362 extern int _kern_disable_debugger(int state); 363 364 extern status_t _kern_install_default_debugger(port_id debuggerPort); 365 extern port_id _kern_install_team_debugger(team_id team, 366 port_id debuggerPort); 367 extern status_t _kern_remove_team_debugger(team_id team); 368 extern status_t _kern_debug_thread(thread_id thread); 369 extern void _kern_wait_for_debugger(void); 370 371 extern status_t _kern_set_debugger_breakpoint(void *address, uint32 type, 372 int32 length, bool watchpoint); 373 extern status_t _kern_clear_debugger_breakpoint(void *address, 374 bool watchpoint); 375 376 /* atomic_* ops (needed for CPUs that don't support them directly) */ 377 #ifdef ATOMIC_FUNCS_ARE_SYSCALLS 378 extern int32 _kern_atomic_set(vint32 *value, int32 newValue); 379 extern int32 _kern_atomic_test_and_set(vint32 *value, int32 newValue, int32 testAgainst); 380 extern int32 _kern_atomic_add(vint32 *value, int32 addValue); 381 extern int32 _kern_atomic_and(vint32 *value, int32 andValue); 382 extern int32 _kern_atomic_or(vint32 *value, int32 orValue); 383 extern int32 _kern_atomic_get(vint32 *value); 384 #endif // ATOMIC_FUNCS_ARE_SYSCALLS 385 386 #ifdef ATOMIC64_FUNCS_ARE_SYSCALLS 387 extern int64 _kern_atomic_set64(vint64 *value, int64 newValue); 388 extern int64 _kern_atomic_test_and_set64(vint64 *value, int64 newValue, int64 testAgainst); 389 extern int64 _kern_atomic_add64(vint64 *value, int64 addValue); 390 extern int64 _kern_atomic_and64(vint64 *value, int64 andValue); 391 extern int64 _kern_atomic_or64(vint64 *value, int64 orValue); 392 extern int64 _kern_atomic_get64(vint64 *value); 393 #endif // ATOMIC64_FUNCS_ARE_SYSCALLS 394 395 /* System informations */ 396 extern status_t _kern_get_system_info(system_info *info, size_t size); 397 398 /* Debug output */ 399 extern void _kern_debug_output(const char *message); 400 extern void _kern_ktrace_output(const char *message); 401 extern status_t _kern_frame_buffer_update(addr_t baseAddress, int32 width, 402 int32 height, int32 depth, int32 bytesPerRow); 403 404 /* messaging service */ 405 extern area_id _kern_register_messaging_service(sem_id lockingSem, 406 sem_id counterSem); 407 extern status_t _kern_unregister_messaging_service(); 408 409 extern void _kern_clear_caches(void *address, size_t length, uint32 flags); 410 extern bool _kern_cpu_enabled(int32 cpu); 411 extern status_t _kern_set_cpu_enabled(int32 cpu, bool enabled); 412 413 #ifdef __INTEL__ 414 // our only x86 only syscall 415 extern status_t _kern_get_cpuid(cpuid_info *info, uint32 eax, uint32 cpu); 416 #endif 417 418 419 /* Disk Device Manager syscalls */ 420 421 // iterating, retrieving device/partition data 422 extern partition_id _kern_get_next_disk_device_id(int32 *cookie, size_t *neededSize); 423 extern partition_id _kern_find_disk_device(const char *filename, size_t *neededSize); 424 extern partition_id _kern_find_partition(const char *filename, size_t *neededSize); 425 extern status_t _kern_get_disk_device_data(partition_id deviceID, 426 bool deviceOnly, struct user_disk_device_data *buffer, 427 size_t bufferSize, size_t *neededSize); 428 extern partition_id _kern_register_file_device(const char *filename); 429 extern status_t _kern_unregister_file_device(partition_id deviceID, 430 const char *filename); 431 // Only a valid deviceID or filename need to be passed. The other one 432 // is -1/NULL. If both is given only filename is ignored. 433 434 // disk systems 435 extern status_t _kern_get_disk_system_info(disk_system_id id, 436 struct user_disk_system_info *info); 437 extern status_t _kern_get_next_disk_system_info(int32 *cookie, 438 struct user_disk_system_info *info); 439 extern status_t _kern_find_disk_system(const char *name, 440 struct user_disk_system_info *info); 441 442 // disk device modification 443 extern status_t _kern_defragment_partition(partition_id partitionID, 444 int32* changeCounter); 445 extern status_t _kern_repair_partition(partition_id partitionID, 446 int32* changeCounter, bool checkOnly); 447 extern status_t _kern_resize_partition(partition_id partitionID, 448 int32* changeCounter, partition_id childID, 449 int32* childChangeCounter, off_t size, 450 off_t contentSize); 451 extern status_t _kern_move_partition(partition_id partitionID, 452 int32* changeCounter, partition_id childID, 453 int32* childChangeCounter, off_t newOffset, 454 partition_id* descendantIDs, 455 int32* descendantChangeCounters, int32 descendantCount); 456 extern status_t _kern_set_partition_name(partition_id partitionID, 457 int32* changeCounter, partition_id childID, 458 int32* childChangeCounter, const char* name); 459 extern status_t _kern_set_partition_content_name(partition_id partitionID, 460 int32* changeCounter, const char* name); 461 extern status_t _kern_set_partition_type(partition_id partitionID, 462 int32* changeCounter, partition_id childID, 463 int32* childChangeCounter, const char* type); 464 extern status_t _kern_set_partition_parameters(partition_id partitionID, 465 int32* changeCounter, partition_id childID, 466 int32* childChangeCounter, const char* parameters, 467 size_t parametersSize); 468 extern status_t _kern_set_partition_content_parameters( 469 partition_id partitionID, int32* changeCounter, 470 const char* parameters, size_t parametersSize); 471 extern status_t _kern_initialize_partition(partition_id partitionID, 472 int32* changeCounter, const char* diskSystemName, 473 const char* name, const char* parameters, 474 size_t parametersSize); 475 extern status_t _kern_uninitialize_partition(partition_id partitionID, 476 int32* changeCounter); 477 extern status_t _kern_create_child_partition(partition_id partitionID, 478 int32* changeCounter, off_t offset, off_t size, 479 const char* type, const char* name, 480 const char* parameters, size_t parametersSize, 481 partition_id* childID, int32* childChangeCounter); 482 extern status_t _kern_delete_child_partition(partition_id partitionID, 483 int32* changeCounter, partition_id childID, 484 int32 childChangeCounter); 485 486 #if 0 487 488 // watching 489 status_t start_disk_device_watching(port_id, int32 token, uint32 flags); 490 status_t start_disk_device_job_watching(disk_job_id job, port_id, int32 token, 491 uint32 flags); 492 status_t stop_disk_device_watching(port_id, int32 token); 493 494 #endif // 0 495 496 497 // The end mark for gensyscallinfos. 498 #ifdef GEN_SYSCALL_INFOS_PROCESSING 499 #pragma syscalls end 500 #endif 501 502 #ifdef __cplusplus 503 } 504 #endif 505 506 #endif /* _SYSTEM_SYSCALLS_H */ 507