void abort(void) { __SYSCALL1(SYS_TASK_EXIT, true); /* Unreachable */ while (1); }
/** Enable I/O space range to task. * * Caller of this function must have the IO_MEM_MANAGER capability. * * @param id Task ID. * @param ioaddr Starting address of the I/O range. * @param size Size of the range. * * @return EOK on success * @return EPERM if the caller lacks the CAP_IO_MANAGER capability * @return ENOENT if there is no task with specified ID * @return ENOMEM if there was some problem in allocating memory. * */ int iospace_enable(task_id_t id, void *ioaddr, unsigned long size) { ddi_ioarg_t arg; arg.task_id = id; arg.ioaddr = ioaddr; arg.size = size; return __SYSCALL1(SYS_IOSPACE_ENABLE, (sysarg_t) &arg); }
/** Enable I/O space range to task. * * Caller of this function must have the IO_MEM_MANAGER capability. * * @param id Task ID. * @param ioaddr Starting address of the I/O range. * @param size Size of the range. * * @return EOK on success * @return EPERM if the caller lacks the CAP_IO_MANAGER capability * @return ENOENT if there is no task with specified ID * @return ENOMEM if there was some problem in allocating memory. * */ static int iospace_enable(task_id_t id, void *ioaddr, size_t size) { const ddi_ioarg_t arg = { .task_id = id, .ioaddr = ioaddr, .size = size }; return __SYSCALL1(SYS_IOSPACE_ENABLE, (sysarg_t) &arg); }
void exit(int status) { if (env_setup) { __stdio_done(); task_retval(status); fibril_teardown(__tcb_get()->fibril_data); } __SYSCALL1(SYS_TASK_EXIT, false); /* Unreachable */ while (1); }
void udelay(useconds_t time) { (void) __SYSCALL1(SYS_THREAD_UDELAY, (sysarg_t) time); }
/** Wait unconditionally for specified number of microseconds * */ int usleep(useconds_t usec) { (void) __SYSCALL1(SYS_THREAD_USLEEP, usec); return 0; }