#define assert(expression)
#define SYSCALL_DEFINE(num, returnType,...)
Macro to define a syscall.
void cwd_set(cwd_t *cwd, const path_t *newPath)
Set the current working directory.
void cwd_init(cwd_t *cwd)
Initialize a CWD structure.
void cwd_clear(cwd_t *cwd)
Clear the current working directory.
path_t cwd_get(cwd_t *cwd)
Get the current working directory.
void cwd_deinit(cwd_t *cwd)
Deinitialize a CWD structure.
bool dentry_is_dir(dentry_t *dentry)
Check if the inode associated with a dentry is a directory.
uint64_t namespace_get_root_path(namespace_t *ns, path_t *out)
Get the root path of a namespace.
void path_put(path_t *path)
Put a path.
#define PATH_DEFER(path)
Defer path put.
uint64_t path_walk(path_t *path, const pathname_t *pathname, namespace_t *ns)
Walk a pathname to a path.
void path_copy(path_t *dest, const path_t *src)
Copy a path.
#define PATH_EMPTY
Helper to create an empty path.
process_t * process_get_kernel(void)
Gets the kernel process.
uint64_t thread_copy_from_user_pathname(thread_t *thread, pathname_t *pathname, const char *userPath)
Safely copy a string from user space and use it to initialize a pathname.
thread_t * sched_thread(void)
Retrieves the currently running thread.
static void lock_init(lock_t *lock)
Initializes a lock.
static void lock_release(lock_t *lock)
Releases a lock.
static void lock_acquire(lock_t *lock)
Acquires a lock, blocking until it is available.
#define ENOTDIR
Not a directory.
#define errno
Error number variable.
#define NULL
Pointer error value.
#define ERR
Integer error value.
Thread of execution structure.
process_t * process
The parent process that the thread executes within.