3 * \brief User-side system call wrappers
7 * Copyright (c) 2007, 2008, 2009, 2010, ETH Zurich.
10 * This file is distributed under the terms in the attached LICENSE file.
11 * If you do not find this file, copies can be found by writing to:
12 * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
15 #ifndef LIBBARRELFISH_SYSCALL_H
16 #define LIBBARRELFISH_SYSCALL_H
18 /* Proper Barrelfish system calls */
20 #include <sys/cdefs.h> /* for __BEGIN_DECLS, __END_DECLS */
21 #include <errors/errno.h> /* for errval_t */
26 * \brief Yield the CPU.
28 * Yields the remainder of the time-slice for this dispatcher to the next
29 * runnable dispatcher.
31 * \param target Dispatcher to yield to, or CPTR_NULL for an undirected yield
33 * \return Syscall error code (#SYS_ERR_OK on success).
35 errval_t sys_yield(capaddr_t target);
37 /** Suspend the current cpu */
38 errval_t sys_suspend(bool halt);
40 /* Debug/Benchmarking system calls */
41 errval_t sys_nop(void);
42 errval_t sys_reboot(void);
45 * \brief Print a string through the kernel.
47 * This calls #SYSCALL_PRINT to print 'string' of length 'length' through
48 * the kernel. Whether and where 'string' is printed is determined by
51 * \param string Pointer to string to print.
52 * \param length Length of string.
54 * \return Syscall error code (#SYS_ERR_OK on success).
56 errval_t sys_print(const char *string, size_t length);
59 * \brief get time elapsed since system boot.
61 uint64_t sys_get_absolute_time(void);
64 #endif //LIBBARRELFISH_SYSCALL_H