Native CPU internal symbols. More...
Native CPU internal symbols.
Definition in file native_internal.h.
#include "util/ucontext.h"
#include <stdio.h>
#include <stdint.h>
#include <poll.h>
#include <stdbool.h>
#include <netdb.h>
#include <ifaddrs.h>
#include <time.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <sys/uio.h>
#include <dirent.h>
#include "cpu_conf.h"
#include "thread.h"
#include "sched.h"
#include "syscalls.h"
Go to the source code of this file.
Internal native CPU API | |
typedef void(* | _native_callback_t) (void) |
Prototype for native's internal callbacks. | |
void | native_cpu_init (void) |
Initializes native CPU. | |
Native Signal Handling | |
void | native_interrupt_init (void) |
Registers signal handlers for the native CPU. | |
int | native_register_interrupt (int sig, _native_callback_t handler) |
Register interrupt handler handler for interrupt signal. | |
int | native_unregister_interrupt (int sig) |
Unregister interrupt handler for interrupt signal. | |
void | _native_sig_leave_tramp (void) |
Switches to ISR context, then enables IRQ and returns to userspace. | |
System Calls | |
We wrap system calls and syscall-invoking library calls to ensure no context switches occur during a system call. | |
static void | _native_pending_syscalls_up (void) |
Increment spending system call counter. | |
static void | _native_pending_syscalls_down (void) |
Decrements pending system call counter. | |
void | _native_init_syscalls (void) |
Registers system calls. | |
Native Context Switching | |
volatile uintptr_t | _native_user_fptr |
Points to instruction in userspace where RIOT left off and switched to ISR context. | |
volatile int | _native_in_isr |
A boolean variable indicating whether program execution currently takes place in an ISR context. | |
char | _isr_stack [THREAD_STACKSIZE_DEFAULT] |
Stack used in ISR context. | |
ucontext_t * | _native_isr_context |
ISR context. | |
static void | _native_isr_context_make (void(*func)(void)) |
Makes ISR context so that execution continues at func when the context is applied. | |
static ucontext_t * | _native_user_context (void) |
Retrieves user context. | |
Native Read/Write Methods | |
ssize_t | _native_read (int fd, void *buf, size_t count) |
Reads file, populates given buffer. | |
ssize_t | _native_write (int fd, const void *buf, size_t count) |
Writes given data into file. | |
ssize_t | _native_writev (int fildes, const struct iovec *iov, int iovcnt) |
Performs a vectored write operation. | |