repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
willmexe/opuntiaOS
kernel/kernel/platform/x86/tasking/tss.c
<reponame>willmexe/opuntiaOS /* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <mem/kmalloc.h> #include <mem/vmm.h> #include <platform/x86/gdt.h> #inc...
willmexe/opuntiaOS
userland/applications/activity_monitor/GraphView.h
#pragma once #include <libg/Font.h> #include <libui/View.h> #include <string> class GraphView : public UI::View { UI_OBJECT(); public: GraphView(UI::View* superview, const LG::Rect&, int data_size); void display(const LG::Rect& rect) override; void add_new_value(int val) { for (int i = 0...
willmexe/opuntiaOS
libs/libc/include/ctype.h
<reponame>willmexe/opuntiaOS #ifndef _LIBC_CTYPE_H #define _LIBC_CTYPE_H #include <stddef.h> #include <sys/_structs.h> #include <sys/cdefs.h> #include <sys/types.h> __BEGIN_DECLS #define _U 01 #define _L 02 #define _N 04 #define _S 010 #define _P 020 #define _C 040 #define _X 0100 #define _B 0200 extern const char ...
willmexe/opuntiaOS
libs/libc/posix/time.c
#include <sys/time.h> #include <sysdep.h> int gettimeofday(timeval_t* tv, timezone_t* tz) { int res = DO_SYSCALL_2(SYS_GETTIMEOFDAY, tv, tz); RETURN_WITH_ERRNO(res, res, -1); } int settimeofday(const timeval_t* tv, const timezone_t* tz) { return -1; }
willmexe/opuntiaOS
libs/libui/include/libui/EdgeInsets.h
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #pragma once namespace UI { class EdgeInsets { public: EdgeInsets() = default; EdgeInsets(int top, ...
willmexe/opuntiaOS
libs/libc/include/stdlib.h
#ifndef _LIBC_STDLIB_H #define _LIBC_STDLIB_H #include <stddef.h> #include <sys/cdefs.h> #include <sys/environ.h> #include <sys/types.h> __BEGIN_DECLS #ifndef NOMINMAX #ifndef max #define max(a, b) \ ({ __typeof__ (a) _a = (a); \ __typeof__ (b) _b = (b); \ _a > _b ? _a : _b; }) #endif /* max */ #ifn...
willmexe/opuntiaOS
libs/libui/include/libui/Common/MenuItem.h
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #pragma once #include <functional> #include <libipc/VectorEncoder.h> #include <string> #include <utility> na...
willmexe/opuntiaOS
userland/system/homescreen/FastLaunchEntity.h
#pragma once #include <libg/PixelBitmap.h> #include <string> class FastLaunchEntity { public: FastLaunchEntity() = default; void set_icon(LG::PixelBitmap&& icon) { m_icon = std::move(icon); } const LG::PixelBitmap& icon() const { return m_icon; } void set_path_to_exec(std::string&& path) { m_path_to_...
willmexe/opuntiaOS
kernel/include/mem/kswapd.h
<filename>kernel/include/mem/kswapd.h /* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef _KERNEL_MEM_KSWAPD_H #define _KERNEL_MEM_KSWAPD_H void kswapd(...
willmexe/opuntiaOS
kernel/include/io/tty/pty_slave.h
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef _KERNEL_IO_TTY_PTY_SLAVE_H #define _KERNEL_IO_TTY_PTY_SLAVE_H #include <algo/sync_ringbuffer.h> #if...
willmexe/opuntiaOS
kernel/include/platform/generic/syscalls/params.h
#ifdef __i386__ #include <platform/x86/syscalls/params.h> #elif __arm__ #include <platform/aarch32/syscalls/params.h> #endif
willmexe/opuntiaOS
kernel/include/algo/bitmap.h
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef _KERNEL_ALGO_BITMAP_H #define _KERNEL_ALGO_BITMAP_H #include <libkern/types.h> struct bitmap { ...
willmexe/opuntiaOS
kernel/include/tasking/proc.h
<filename>kernel/include/tasking/proc.h /* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef _KERNEL_TASKING_PROC_H #define _KERNEL_TASKING_PROC_H #inclu...
willmexe/opuntiaOS
kernel/include/drivers/generic/timer.h
#ifdef __i386__ #include <drivers/x86/pit.h> #elif __arm__ #include <drivers/aarch32/sp804.h> #endif
willmexe/opuntiaOS
libs/libc/include/sched.h
#ifndef _LIBC_SCHED_H #define _LIBC_SCHED_H #include <sys/cdefs.h> #include <sys/types.h> __BEGIN_DECLS void sched_yield(); __END_DECLS #endif // _LIBC_SCHED_H
willmexe/opuntiaOS
kernel/include/libkern/printf.h
<filename>kernel/include/libkern/printf.h #ifndef _KERNEL_LIBKERN_PRINTF_H #define _KERNEL_LIBKERN_PRINTF_H #include <libkern/types.h> typedef int (*printf_putch_callback)(char ch, char* buf_base, size_t* written, void* callback_params); int vsnprintf(char* s, size_t n, const char* format, va_list arg); int vsprintf...
willmexe/opuntiaOS
kernel/include/platform/x86/vmm/consts.h
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef _KERNEL_PLATFORM_X86_VMM_CONSTS_H #define _KERNEL_PLATFORM_X86_VMM_CONSTS_H #define VMM_PTE_COUNT (1...
willmexe/opuntiaOS
userland/tests/utester/main.c
<gh_stars>0 #include <fcntl.h> #include <sched.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/wait.h> #include <unistd.h> void exectest(void) { int i, pid; char* paramscat[] = { "/bin/cat", "../readme", "../readme", (char*)0, ...
willmexe/opuntiaOS
userland/utilities/edit/lifetime.h
<filename>userland/utilities/edit/lifetime.h<gh_stars>100-1000 #ifndef _USERLAND_EDIT_LIFETIME_H #define _USERLAND_EDIT_LIFETIME_H #include "viewer.h" #include <termios.h> extern struct termios orig_term; void enable_raw_mode(); void restore_termios(); void exit_app(); void crash_app(); #endif
willmexe/opuntiaOS
userland/utilities/edit/menu.h
<gh_stars>100-1000 #ifndef _USERLAND_EDIT_MENU_H #define _USERLAND_EDIT_MENU_H #include "mode.h" #include "viewer.h" void menu_enter_mode(); void menu_leave_mode(); void menu_accept_key(char key); #endif
willmexe/opuntiaOS
libs/libc/stdlib/env.c
<filename>libs/libc/stdlib/env.c #include <stdbool.h> #include <stdlib.h> #include <string.h> static void free_var(const char* string) { // TODO: Implement me! } char* getenv(const char* name) { size_t len = strlen(name); for (int i = 0; environ[i]; i++) { const char* envv = environ[i]; ch...
willmexe/opuntiaOS
libs/libc/include/sys/environ.h
#ifndef _LIBC_SYS_ENVIRON_H #define _LIBC_SYS_ENVIRON_H #include <sys/cdefs.h> __BEGIN_DECLS extern char** environ; __END_DECLS #endif // _LIBC_SYS_ENVIRON_H
willmexe/opuntiaOS
libs/libui/include/libui/Screen.h
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #pragma once #include <cstring> #include <fcntl.h> #include <libg/Rect.h> #include <string> #include <sys/ioc...
willmexe/opuntiaOS
kernel/kernel/syscalls/handler.c
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <libkern/bits/errno.h> #include <libkern/libkern.h> #include <libkern/log.h> #include <mem/kmalloc.h...
willmexe/opuntiaOS
libs/libc/ptrace/ptrace.c
#include <sys/ptrace.h> #include <sysdep.h> int ptrace(ptrace_request_t request, pid_t pid, void* addr, void* data) { int res = DO_SYSCALL_4(SYS_PTRACE, request, pid, addr, data); RETURN_WITH_ERRNO(res, 0, res); }
willmexe/opuntiaOS
userland/utilities/rmdir/main.c
<reponame>willmexe/opuntiaOS<filename>userland/utilities/rmdir/main.c #include <stdio.h> #include <unistd.h> int main(int argc, char** argv) { if (argc < 2) { printf("Usage: rmdir files...\n"); return 0; } for (int i = 1; i < argc; i++) { if (rmdir(argv[i]) < 0) { print...
willmexe/opuntiaOS
userland/system/homescreen/HomeScreenView.h
<filename>userland/system/homescreen/HomeScreenView.h #pragma once #include "AppListView.h" #include "FastLaunchEntity.h" #include "HomeScreenEntity.h" #include <libg/Font.h> #include <libui/StackView.h> #include <libui/View.h> #include <list> #include <string> #include <vector> class HomeScreenView : public UI::View ...
willmexe/opuntiaOS
libs/libc/include/bits/signal.h
<reponame>willmexe/opuntiaOS<gh_stars>100-1000 #ifndef _LIBC_BITS_SIGNAL_H #define _LIBC_BITS_SIGNAL_H #define SIGHUP 1 #define SIGINT 2 #define SIGQUIT 3 #define SIGILL 4 #define SIGTRAP 5 #define SIGABRT 6 #define SIGIOT 6 #define SIGBUS 7 #define SIGFPE 8 #define SIGKILL 9 #define SIGUSR1 10 #define SIGSEGV 11 #def...
willmexe/opuntiaOS
test/kernel/signal/main.c
<gh_stars>100-1000 #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> int ret = 1; void save_on_terminate() { ret = 0; } int main(int argc, char** argv) { sigaction(SIGTERM, save_on_terminate); raise(SIGTERM); return ret; }
willmexe/opuntiaOS
kernel/kernel/libkern/log.c
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <drivers/generic/uart.h> #include <libkern/libkern.h> #include <libkern/lock.h> #include <libkern/lo...
willmexe/opuntiaOS
kernel/kernel/fs/procfs/procfs.c
<gh_stars>0 /* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <fs/procfs/procfs.h> #include <fs/vfs.h> #include <libkern/bits/errno.h> #include <libke...
willmexe/opuntiaOS
libs/libc/include/sys/select.h
#ifndef _LIBC_SYS_SELECT_H #define _LIBC_SYS_SELECT_H #include <bits/sys/select.h> #include <bits/time.h> #include <stddef.h> #include <sys/cdefs.h> #include <sys/types.h> __BEGIN_DECLS int select(int nfds, fd_set_t* readfds, fd_set_t* writefds, fd_set_t* exceptfds, timeval_t* timeout); __END_DECLS #endif // _LIBC...
willmexe/opuntiaOS
kernel/include/libkern/lock.h
<filename>kernel/include/libkern/lock.h /* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef _KERNEL_LIBKERN_LOCK_H #define _KERNEL_LIBKERN_LOCK_H #inclu...
willmexe/opuntiaOS
boot/x86/stage2/stage2.c
<gh_stars>0 /** * Stage2 is used to load main kernel. */ #include "config.h" #include "drivers/ata.h" #include "drivers/uart.h" #include "mem/vm.h" #include <libboot/abi/drivers.h> #include <libboot/abi/memory.h> #include <libboot/elf/elf_lite.h> #include <libboot/fs/ext2_lite.h> #include <libboot/log/log.h> #includ...
willmexe/opuntiaOS
libs/libc/time/time.c
<filename>libs/libc/time/time.c #include <sys/time.h> #include <sysdep.h> #include <time.h> static const int __days_per_month[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; static inline char __is_leap_year(time_t year) { return ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0); } static void ...
willmexe/opuntiaOS
kernel/include/platform/generic/vmm/pte.h
#ifdef __i386__ #include <platform/x86/vmm/pte.h> #elif __arm__ #include <platform/aarch32/vmm/pte.h> #endif
willmexe/opuntiaOS
kernel/include/platform/x86/system.h
<reponame>willmexe/opuntiaOS<filename>kernel/include/platform/x86/system.h /* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef _KERNEL_PLATFORM_X86_SYSTE...
willmexe/opuntiaOS
boot/x86/stage2/mem/vm.c
#include "vm.h" int vm_setup() { ptable_t* table_0mb = (ptable_t*)0x9A000; ptable_t* table_0mbplus = (ptable_t*)0x98000; ptable_t* table_3gb = (ptable_t*)0x9B000; ptable_t* table_3gbplus = (ptable_t*)0x99000; ptable_t* table_stack = (ptable_t*)0x9C000; pdirectory_t* dir = (pdirectory_t*)0x9D000...
willmexe/opuntiaOS
boot/aarch32/target/cortex-a15/memmap.h
<filename>boot/aarch32/target/cortex-a15/memmap.h /* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef _BOOT_TARGET_CORTEX_A15_MEMMAP_H #define _BOOT_TARG...
willmexe/opuntiaOS
libs/libc/include/pthread.h
#ifndef _LIBC_PTHREAD_H #define _LIBC_PTHREAD_H #include <bits/thread.h> #include <sys/_structs.h> #include <sys/cdefs.h> #include <sys/types.h> __BEGIN_DECLS int pthread_create(void* func); __END_DECLS #endif /* _LIBC_PTHREAD_H */
willmexe/opuntiaOS
test/kernel/fs/cwd/main.c
<gh_stars>100-1000 #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> char buf[256]; #define ANSWER "/test_bin/kernel$fs$cwd" int main(int argc, char** argv) { int fd = 0; fd = open("/proc/self/exe", O_RDONLY); int rd = read(fd, buf, 256); if (rd != str...
willmexe/opuntiaOS
kernel/kernel/mem/memzone.c
<reponame>willmexe/opuntiaOS<gh_stars>100-1000 /* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <fs/vfs.h> #include <libkern/bits/errno.h> #include <...
willmexe/opuntiaOS
kernel/include/platform/generic/init.h
<gh_stars>100-1000 #ifdef __i386__ #include <platform/x86/init.h> #elif __arm__ #include <platform/aarch32/init.h> #endif
willmexe/opuntiaOS
boot/aarch32/vmm/vmm.h
<reponame>willmexe/opuntiaOS /* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef _BOOT_VMM_VMM_H #define _BOOT_VMM_VMM_H #include "consts.h" #include <l...
willmexe/opuntiaOS
kernel/kernel/drivers/x86/pci.c
<reponame>willmexe/opuntiaOS /* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <drivers/x86/pci.h> // #define DEBUG_PCI static driver_desc_t _pci_dr...
willmexe/opuntiaOS
userland/tests/mmaptest/main.c
#include <sys/mman.h> #include <unistd.h> #define BUF_SIZE 512 char buf[BUF_SIZE]; void cat(int fd) { int n = 0; while ((n = read(fd, buf, sizeof(buf))) > 0) { if (write(1, buf, n) != n) { exit(1); } } } int main(int argc, char** argv) { int fd, i; if (argc <= 1) { ...
willmexe/opuntiaOS
servers/window_server/shared/MessageContent/MenuBar.h
#pragma once #include <cstdint> #include <libg/Color.h> struct StatusBarStyle { public: enum Mode : uint32_t { LightText = (1 << 0), HideText = (1 << 1), }; StatusBarStyle() : m_flags(0) , m_color(LG::Color::LightSystemBackground) { } StatusBarStyle(uint32_t at...
willmexe/opuntiaOS
libs/libfoundation/include/libfoundation/ByteOrder.h
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #pragma once #include <cstddef> namespace LFoundation { class ByteOrder { public: template <typename T...
willmexe/opuntiaOS
kernel/kernel/syscalls/identity.c
<reponame>willmexe/opuntiaOS<gh_stars>100-1000 /* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <libkern/bits/errno.h> #include <libkern/libkern.h> #...
willmexe/opuntiaOS
kernel/kernel/drivers/x86/fpu.c
<reponame>willmexe/opuntiaOS<filename>kernel/kernel/drivers/x86/fpu.c /* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <drivers/x86/fpu.h> #include <...
willmexe/opuntiaOS
kernel/include/platform/generic/vmm/pf_types.h
#ifdef __i386__ #include <platform/x86/vmm/pf_types.h> #elif __arm__ #include <platform/aarch32/vmm/pf_types.h> #endif
willmexe/opuntiaOS
kernel/kernel/algo/bitmap.c
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <algo/bitmap.h> #include <libkern/bits/errno.h> #include <libkern/platform.h> #include <mem/kmalloc....
willmexe/opuntiaOS
kernel/kernel/mem/vm_pspace32.c
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <libkern/bits/errno.h> #include <libkern/libkern.h> #include <libkern/lock.h> #include <libkern/log....
willmexe/opuntiaOS
kernel/include/libkern/stdarg.h
#ifndef _KERNEL_LIBKERN_STDARG_H #define _KERNEL_LIBKERN_STDARG_H #define va_start(v, l) __builtin_va_start(v, l) #define va_end(v) __builtin_va_end(v) #define va_arg(v, l) __builtin_va_arg(v, l) #endif // _KERNEL_LIBKERN_STDARG_H
willmexe/opuntiaOS
libs/libui/include/libui/ClientDecoder.h
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #pragma once #include "../../../servers/window_server/shared/Connections/WSConnection.h" #include <libfoundat...
willmexe/opuntiaOS
kernel/kernel/syscalls/time.c
<reponame>willmexe/opuntiaOS<gh_stars>100-1000 /* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <libkern/bits/errno.h> #include <libkern/libkern.h> #...
willmexe/opuntiaOS
kernel/include/drivers/generic/rtc.h
<filename>kernel/include/drivers/generic/rtc.h #ifdef __i386__ #include <drivers/x86/rtc.h> #elif __arm__ #include <drivers/aarch32/pl031.h> #endif
willmexe/opuntiaOS
libs/libc/include/bits/sys/stat.h
#ifndef _LIBC_BITS_SYS_STAT_H #define _LIBC_BITS_SYS_STAT_H #include <sys/types.h> /* MODES */ #define S_IFSOCK 0xC000 /* [XSI] socket */ #define S_IFLNK 0xA000 /* [XSI] symbolic link */ #define S_IFREG 0x8000 /* [XSI] regular */ #define S_IFBLK 0x6000 /* [XSI] block special */ #define S_IFDIR 0x4000 /* [XSI] directo...
willmexe/opuntiaOS
boot/x86/stage2/config.h
#ifndef STAGE2_CONFIG #define STAGE2_CONFIG #define KERNEL_PATH "/boot/kernel.bin" #define KERNEL_BASE 0x100000 #endif // STAGE2_CONFIG
willmexe/opuntiaOS
boot/aarch32/main.c
<gh_stars>0 /* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "drivers/pl181.h" #include "drivers/uart.h" #include "target/memmap.h" #include "vmm/vmm...
willmexe/opuntiaOS
libs/libc/posix/system.c
#include <string.h> #include <sys/utsname.h> #include <sysdep.h> #include <unistd.h> int uname(utsname_t* buf) { int res = DO_SYSCALL_1(SYS_UNAME, buf); RETURN_WITH_ERRNO(res, 0, -1); } #define PATH_CONSTANT "/bin:/usr/bin" #define PATH_CONSTANT_LEN sizeof(PATH_CONSTANT) size_t confstr(int name, char* buf, si...
willmexe/opuntiaOS
libs/libc/pthread/pthread.c
#include <pthread.h> #include <sys/mman.h> #include <sysdep.h> int pthread_create(void* func) { uint32_t start = (uint32_t)mmap(NULL, 4096, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_STACK | MAP_PRIVATE, 0, 0); thread_create_params_t params; params.stack_start = start; params.stack_size = 4096; params...
willmexe/opuntiaOS
userland/system/homescreen/HomeScreenEntity.h
<filename>userland/system/homescreen/HomeScreenEntity.h #pragma once #include <libg/PixelBitmap.h> class HomeScreenEntity { public: HomeScreenEntity() = default; HomeScreenEntity(int window_id) : m_window_id(window_id) { } bool operator==(const HomeScreenEntity& other) const { return m_wi...
willmexe/opuntiaOS
libs/libc/include/sys/ptrace.h
<filename>libs/libc/include/sys/ptrace.h #ifndef _LIBC_SYS_PTRACE_H #define _LIBC_SYS_PTRACE_H #include <bits/sys/ptrace.h> #include <stddef.h> #include <sys/cdefs.h> #include <sys/types.h> __BEGIN_DECLS int ptrace(ptrace_request_t request, pid_t pid, void* addr, void* data); __END_DECLS #endif // _LIBC_SYS_PTRACE...
willmexe/opuntiaOS
kernel/include/platform/x86/idt.h
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef _KERNEL_PLATFORM_X86_IDT_H #define _KERNEL_PLATFORM_X86_IDT_H #include <libkern/c_attrs.h> #include ...
willmexe/opuntiaOS
kernel/include/mem/kmalloc.h
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef _KERNEL_MEM_KMALLOC_H #define _KERNEL_MEM_KMALLOC_H #include <libkern/types.h> #include <mem/vmm.h> ...
willmexe/opuntiaOS
kernel/kernel/tasking/thread.c
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <fs/vfs.h> #include <libkern/bits/errno.h> #include <libkern/libkern.h> #include <libkern/log.h> #in...
willmexe/opuntiaOS
boot/aarch32/vmm/consts.h
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef _BOOT_VMM_CONSTS_H #define _BOOT_VMM_CONSTS_H #define VMM_PTE_COUNT (256) #define VMM_PDE_COUNT (409...
willmexe/opuntiaOS
libs/libc/include/pwd.h
#ifndef _LIBC_PWD_H #define _LIBC_PWD_H #include <sys/cdefs.h> #include <sys/types.h> __BEGIN_DECLS struct passwd { char* pw_name; char* pw_passwd; uid_t pw_uid; gid_t pw_gid; char* pw_gecos; char* pw_dir; char* pw_shell; }; typedef struct passwd passwd_t; void setpwent(); void endpwent(...
willmexe/opuntiaOS
kernel/include/algo/dynamic_array.h
<reponame>willmexe/opuntiaOS<filename>kernel/include/algo/dynamic_array.h /* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef _KERNEL_ALGO_DYNAMIC_ARRAY_...
willmexe/opuntiaOS
boot/x86/stage2/drivers/uart.c
<gh_stars>100-1000 /* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "uart.h" #include "port.h" static int _uart_setup_impl(int port) { port_byte...
willmexe/opuntiaOS
kernel/include/libkern/rwlock.h
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef _KERNEL_LIBKERN_RWLOCK_H #define _KERNEL_LIBKERN_RWLOCK_H #include <libkern/atomic.h> #include <libk...
willmexe/opuntiaOS
kernel/include/platform/generic/tasking/dump_impl.h
<reponame>willmexe/opuntiaOS #ifdef __i386__ #include <platform/x86/tasking/dump_impl.h> #elif __arm__ #include <platform/aarch32/tasking/dump_impl.h> #endif
willmexe/opuntiaOS
libs/libfoundation/include/libfoundation/ProcessInfo.h
/* * Copyright (C) 2020-2022 The opuntiaOS Project Authors. * + Contributed by <NAME> <<EMAIL>> * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #pragma once #include <string> #include <unistd.h> #include <vector> namespace LFoundation { class ProcessI...
edward-jones/riscv-fw-infrastructure
WD-Firmware/rtos/rtosal/rtosal_error.c
<filename>WD-Firmware/rtos/rtosal/rtosal_error.c /* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of th...
edward-jones/riscv-fw-infrastructure
WD-Firmware/demo/demo_comrv_baremetal.c
<reponame>edward-jones/riscv-fw-infrastructure /* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019-2021 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of t...
edward-jones/riscv-fw-infrastructure
WD-Firmware/demo/main.c
<reponame>edward-jones/riscv-fw-infrastructure /* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of ...
edward-jones/riscv-fw-infrastructure
WD-Firmware/demo/demo_trap.c
<gh_stars>10-100 /* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:*www.apache....
edward-jones/riscv-fw-infrastructure
WD-Firmware/psp/psp_mutex_eh2.c
/* * SPDX-License-Identifier: Apache-2.0 * Copyright 2020-2021 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:*www.apache.org/licenses...
edward-jones/riscv-fw-infrastructure
WD-Firmware/psp/api_inc/psp_pragmas.h
/* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019-2021 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:*www.apache.org/licenses...
edward-jones/riscv-fw-infrastructure
WD-Firmware/board/nexys_a7_el2/bsp/bsp_external_interrupts.c
<filename>WD-Firmware/board/nexys_a7_el2/bsp/bsp_external_interrupts.c<gh_stars>10-100 /* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
edward-jones/riscv-fw-infrastructure
WD-Firmware/rtos/rtosal/rtosal_queue.c
<gh_stars>10-100 /* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:*www.apac...
edward-jones/riscv-fw-infrastructure
WD-Firmware/demo/demo_cti.c
<reponame>edward-jones/riscv-fw-infrastructure /* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the Li...
edward-jones/riscv-fw-infrastructure
WD-Firmware/psp/psp_cache_control_eh1.c
<reponame>edward-jones/riscv-fw-infrastructure /* * Copyright (c) 2010-2016 Western Digital, Inc. * * SPDX-License-Identifier: Apache-2.0 * Copyright 2020 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance w...
edward-jones/riscv-fw-infrastructure
WD-Firmware/rtos/rtosal/api_inc/rtosal_error_api.h
/* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:*www.apache.org/licenses/LICE...
edward-jones/riscv-fw-infrastructure
WD-Firmware/rtos/rtosal/config/hifive1/FreeRTOSConfig.h
<gh_stars>10-100 /* FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. This file is part of the FreeRTOS distribution. FreeRTOS is free software; you can redistribute it and/or modify ...
edward-jones/riscv-fw-infrastructure
WD-Firmware/rtos/rtosal/api_inc/rtosal_queue_api.h
/* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:*www.apache.org/licenses/LICE...
edward-jones/riscv-fw-infrastructure
WD-Firmware/rtos/rtosal/api_inc/rtosal_interrupt_api.h
<gh_stars>10-100 /* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:*www.apache....
edward-jones/riscv-fw-infrastructure
WD-Firmware/demo/demo_bit_manipulation.c
/* * SPDX-License-Identifier: Apache-2.0 * Copyright 2020-2021 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:*www.apache.org/license...
edward-jones/riscv-fw-infrastructure
WD-Firmware/rtos/rtosal/api_inc/rtosal_defines.h
/* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:*www.apache.org/licenses/L...
edward-jones/riscv-fw-infrastructure
WD-Firmware/psp/psp_internal_mutex_eh2.c
/* * SPDX-License-Identifier: Apache-2.0 * Copyright 2020-2021 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:*www.apache.org/licenses...
edward-jones/riscv-fw-infrastructure
WD-Firmware/psp/psp_performance_monitor_el2.c
/* * Copyright 2020-2021 Western Digital Corporation or its affiliates. * * SPDX-License-Identifier: Apache-2.0 * Copyright 2020 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You m...
edward-jones/riscv-fw-infrastructure
WD-Firmware/board/nexys_a7_el2/bsp/bsp_timer.h
<gh_stars>10-100 /* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:*www.apac...
edward-jones/riscv-fw-infrastructure
WD-Firmware/rtos/rtosal/rtosal_mutex.c
<gh_stars>10-100 /* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:*www.apac...
edward-jones/riscv-fw-infrastructure
WD-Firmware/psp/loc_inc/psp_internal_mutex_eh2.h
/* * SPDX-License-Identifier: Apache-2.0 * Copyright 2020-2021 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:*www.apache.org/licenses...
edward-jones/riscv-fw-infrastructure
WD-Firmware/rtos/rtosal/rtosal_event.c
<reponame>edward-jones/riscv-fw-infrastructure /* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the ...
edward-jones/riscv-fw-infrastructure
WD-Firmware/psp/api_inc/psp_macros_eh1.h
/* * SPDX-License-Identifier: Apache-2.0 * Copyright 2020 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:*www.apache.org/licenses/LICE...
edward-jones/riscv-fw-infrastructure
WD-Firmware/rtos/rtosal/rtosal_util.c
<reponame>edward-jones/riscv-fw-infrastructure<filename>WD-Firmware/rtos/rtosal/rtosal_util.c /* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance wi...
edward-jones/riscv-fw-infrastructure
WD-Firmware/psp/api_inc/psp_interrupts_eh1.h
<filename>WD-Firmware/psp/api_inc/psp_interrupts_eh1.h /* * SPDX-License-Identifier: Apache-2.0 * Copyright 2020-2021 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a c...
edward-jones/riscv-fw-infrastructure
WD-Firmware/rtos/rtosal/api_inc/rtosal_time_api.h
<filename>WD-Firmware/rtos/rtosal/api_inc/rtosal_time_api.h /* * SPDX-License-Identifier: Apache-2.0 * Copyright 2019 Western Digital Corporation or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a...