repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
willmexe/opuntiaOS | kernel/include/mem/boot.h | <reponame>willmexe/opuntiaOS<filename>kernel/include/mem/boot.h
#ifndef _KERNEL_MEM_BOOT_H
#define _KERNEL_MEM_BOOT_H
#include <libkern/types.h>
struct memory_map {
uint32_t startLo;
uint32_t startHi;
uint32_t sizeLo;
uint32_t sizeHi;
uint32_t type;
uint32_t acpi_3_0;
};
typedef struct memory_... |
willmexe/opuntiaOS | libs/libc/posix/sched.c | <reponame>willmexe/opuntiaOS
#include <sched.h>
#include <sysdep.h>
#include <unistd.h>
void sched_yield()
{
DO_SYSCALL_0(SYS_SCHED_YIELD);
}
int nice(int inc)
{
int res = DO_SYSCALL_1(SYS_NICE, inc);
RETURN_WITH_ERRNO(res, 0, -1);
} |
willmexe/opuntiaOS | boot/aarch32/vmm/vmm.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 "vmm.h"
#include <libboot/log/log.h>
#include <libboot/mem/malloc.h>
#include <libboot/mem/mem.h>
#i... |
willmexe/opuntiaOS | kernel/include/algo/ringbuffer.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_RINGBUFFER_H
#define _KERNEL_ALGO_RINGBUFFER_H
#include <libkern/libkern.h>
#include <l... |
willmexe/opuntiaOS | kernel/kernel/mem/pmm.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/libkern.h>
#include <libkern/log.h>
#include <mem/pmm.h>
// defin... |
willmexe/opuntiaOS | kernel/kernel/platform/aarch32/tasking/dump_impl.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/log.h>
#include <mem/vmm.h>
#include <platform/generic/system.h>
#include <platform/x86/tas... |
willmexe/opuntiaOS | libs/libui/include/libui/ViewController.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 <libfoundation/Event.h>
#include <libfoundation/EventLoop.h>
#include <libfoundation/Ev... |
willmexe/opuntiaOS | libs/libc/sysdeps/unix/generic/ioctl.c | #include <sys/ioctl.h>
#include <sysdep.h>
int ioctl(int fd, uint32_t cmd, uint32_t arg)
{
int res = DO_SYSCALL_3(SYS_IOCTL, fd, cmd, arg);
RETURN_WITH_ERRNO(res, res, -1);
} |
willmexe/opuntiaOS | kernel/include/mem/bits/zone.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_BITS_ZONE_H
#define _KERNEL_MEM_BITS_ZONE_H
#include <mem/bits/mmu.h>
enum ZONE_FLAGS {... |
willmexe/opuntiaOS | libs/libg/include/libg/ImageLoaders/PNGLoader.h | <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.
*/
#pragma once
#include <libfoundation/ByteOrder.h>
#include <libg/Color.h>
#include <libg/... |
willmexe/opuntiaOS | libs/libobjc/include/libobjc/v1/decls.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 _LIBOBJC_V1_DECLS_H
#define _LIBOBJC_V1_DECLS_H
#include <stdint.h>
struct objc_class;
struct objc_... |
willmexe/opuntiaOS | libs/libipc/include/libipc/ServerConnection.h | <gh_stars>100-1000
#pragma once
#include <cstdlib>
#include <libfoundation/Logger.h>
#include <libipc/Message.h>
#include <libipc/MessageDecoder.h>
#include <vector>
template <typename ServerDecoder, typename ClientDecoder>
class ServerConnection {
public:
ServerConnection(int sock_fd, ServerDecoder& server_decode... |
willmexe/opuntiaOS | userland/system/dock/WindowEntity.h | <gh_stars>100-1000
#pragma once
#include <libg/PixelBitmap.h>
#include <string>
class WindowEntity {
public:
enum Status : uint32_t {
Minimized = (1 << 0),
};
WindowEntity()
: m_window_id(0)
, m_title()
{
}
WindowEntity(int window_id)
: m_window_id(window_id)
... |
willmexe/opuntiaOS | libs/libui/include/libui/Connection.h | <reponame>willmexe/opuntiaOS
#pragma once
#include <libipc/ClientConnection.h>
#include <libui/ClientDecoder.h>
#include <sys/types.h>
namespace UI {
class Window;
class Connection {
public:
static Connection& the();
explicit Connection(int connection_fd);
void greeting();
int new_window(const Windo... |
willmexe/opuntiaOS | libs/libc/include/dirent.h | #ifndef _LIBC_DIRENT_H
#define _LIBC_DIRENT_H
#include <stddef.h>
#include <sys/_structs.h>
#include <sys/cdefs.h>
#include <sys/types.h>
__BEGIN_DECLS
struct __dirstream {
int fd;
size_t size; /* size of dir data */
size_t allocated; /* size of data holder block */
size_t offset;
};
typedef struct _... |
willmexe/opuntiaOS | libs/libcxxabi/include/cxxabi.h | <reponame>willmexe/opuntiaOS<filename>libs/libcxxabi/include/cxxabi.h
#ifndef _CXXABI_H
#define _CXXABI_H
#define VIS_HIDDEN __attribute__((visibility("hidden")))
#define VIS_INTERNAL __attribute__((visibility("internal")))
extern "C" {
int __cxa_atexit(void (*)(void*), void*, void*);
void __cxa_finalize(void*);
}
#... |
willmexe/opuntiaOS | boot/libboot/abi/memory.h | <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.
*/
#ifndef _BOOT_LIBBOOT_ABI_MEMORY_H
#define _BOOT_LIBBOOT_ABI_MEMORY_H
#include <libboot/t... |
willmexe/opuntiaOS | libs/libc/include/sys/ioctl.h | #ifndef _LIBC_SYS_IOCTL_H
#define _LIBC_SYS_IOCTL_H
#include <bits/sys/ioctls.h>
#include <stddef.h>
#include <sys/cdefs.h>
#include <sys/types.h>
__BEGIN_DECLS
int ioctl(int fd, uint32_t cmd, uint32_t arg);
__END_DECLS
#endif // _LIBC_SYS_IOCTL_H |
willmexe/opuntiaOS | libs/libfoundation/include/libfoundation/Memory.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.
*/
#pragma once
#include <cstddef>
namespace LFoundation {
[[gnu::always_inline]... |
willmexe/opuntiaOS | kernel/kernel/tasking/proc.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 <io/sockets/socket.h>
#include <io/tty/tty.h>
#include <libkern/bits/errno.h>
#i... |
willmexe/opuntiaOS | kernel/include/mem/memzone.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_MEMZONE_H
#define _KERNEL_MEM_MEMZONE_H
#include <algo/dynamic_array.h>
#include <fs/vfs... |
willmexe/opuntiaOS | libs/libui/include/libui/Layer.h | <filename>libs/libui/include/libui/Layer.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 <libg/Font.h>
#include <libui/Constants/Text... |
willmexe/opuntiaOS | libs/libc/stdlib/pts.c | <filename>libs/libc/stdlib/pts.c<gh_stars>100-1000
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#define _PATH_PTS "/dev/pts"
#define MASTER_PTY(dev) (major(dev) == 128)
#define SLAVE_PTY(dev) (major(dev) == 136)
int posix_openpt(int flags)
{
return open("/dev... |
willmexe/opuntiaOS | kernel/include/tasking/bits/sched.h | <filename>kernel/include/tasking/bits/sched.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_BITS_SCHED_H
#define _KERNEL_TASKING_BI... |
willmexe/opuntiaOS | libs/libc/include/bits/time.h | #ifndef _LIBC_BITS_TIME_H
#define _LIBC_BITS_TIME_H
#include <sys/cdefs.h>
#include <sys/types.h>
__BEGIN_DECLS
struct timeval {
time_t tv_sec;
uint32_t tv_usec;
};
typedef struct timeval timeval_t;
#define DST_NONE 0 /* not on dst */
#define DST_USA 1 /* USA style dst */
#define DST_AUST 2 /* Australian st... |
willmexe/opuntiaOS | servers/window_server/src/SystemApps/SystemApp.h | <filename>servers/window_server/src/SystemApps/SystemApp.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 "../Target/Generic/Window.h... |
willmexe/opuntiaOS | userland/system/applist/AppListWindow.h | #pragma once
#include <libg/Size.h>
#include <libui/Screen.h>
#include <libui/Window.h>
class AppListWindow : public UI::Window {
public:
AppListWindow(const LG::Size& size)
: UI::Window("AppList", size, UI::WindowType::AppList)
{
}
void receive_event(std::unique_ptr<LFoundation::Event> event... |
willmexe/opuntiaOS | kernel/include/libkern/ctype.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_CTYPE_H
#define _KERNEL_LIBKERN_CTYPE_H
#include <libkern/types.h>
#define _U 01
#d... |
willmexe/opuntiaOS | userland/utilities/ls/main.c | #include <dirent.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#define BUF_SIZE 1024
struct linux_dirent {
uint32_t inode;
uint16_t rec_len;
uint8_t name_len;
uint8_t file_type;
char* name;
};
int main(int argc, char** argv)
{
int fd, n... |
willmexe/opuntiaOS | kernel/include/mem/vmm.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_VMM_H
#define _KERNEL_MEM_VMM_H
#include <libkern/libkern.h>
#include <mem/bits/mmu.h>
#... |
willmexe/opuntiaOS | kernel/include/platform/x86/init.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_INIT_H
#define _KERNEL_PLATFORM_X86_INIT_H
#include <libkern/types.h>
void pla... |
willmexe/opuntiaOS | userland/utilities/cat/main.c | #include <fcntl.h>
#include <stdio.h>
#include <stdlib.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 (fwrite(buf, n, 1, stdout) != n) {
exit(1);
}
}
}
int main(int argc, char** ar... |
willmexe/opuntiaOS | libs/libui/include/libui/AppDelegate.h | <filename>libs/libui/include/libui/AppDelegate.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 <libfoundation/Event.h>
#include <libf... |
willmexe/opuntiaOS | userland/applications/activity_monitor/ViewController.h | <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.
*/
#pragma once
#include "GraphView.h"
#include <libfoundation/ProcessInfo.h>
#include <libui... |
willmexe/opuntiaOS | servers/window_server/shared/MessageContent/MouseAction.h | #pragma once
enum MouseActionType {
LeftMouseButtonPressed,
LeftMouseButtonReleased,
RightMouseButtonPressed,
RightMouseButtonReleased,
};
class MouseActionState {
public:
MouseActionState() = default;
~MouseActionState() = default;
inline int state() const { return m_state; }
inline ... |
willmexe/opuntiaOS | libs/libc/include/stdbool.h | <reponame>willmexe/opuntiaOS
#ifndef _LIBC_STDBOOL_H
#define _LIBC_STDBOOL_H
#include <sys/cdefs.h>
__BEGIN_DECLS
#ifndef __bool_true_false_are_defined
#define bool _Bool
#define true (1)
#define false (0)
#define __bool_true_false_are_defined 1
#endif // __bool_true_false_are_defined
__END_DECLS
#endif //_LIBC_ST... |
willmexe/opuntiaOS | libs/libipc/include/libipc/Encoder.h | #pragma once
#include <vector>
typedef std::vector<uint8_t> EncodedMessage;
class Encoder {
public:
~Encoder() = default;
static void append(EncodedMessage& buf, int val)
{
buf.push_back((uint8_t)val);
buf.push_back((uint8_t)(val >> 8));
buf.push_back((uint8_t)(val >> 16));
... |
willmexe/opuntiaOS | kernel/kernel/algo/hash.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/hash.h>
uint32_t hash_crc32(uint8_t* data, size_t len)
{
uint32_t byte, mask;
uint32_... |
willmexe/opuntiaOS | libs/libc/include/sys/cdefs.h | /*
* Copyright (C) 2020-2022 The opuntiaOS Project Authors.
* + Contributed by <NAME> <<EMAIL>>
* + Contributed by bellrise <<EMAIL>>
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef _LIBC_SYS_CDEFS_H
#define _LIBC_SYS_CDEFS_H
#if defined(__cpl... |
willmexe/opuntiaOS | libs/libc/include/termios.h | <reponame>willmexe/opuntiaOS
#ifndef _LIBC_TERMIOS_H
#define _LIBC_TERMIOS_H
#include <sys/_structs.h>
#include <sys/cdefs.h>
#include <sys/types.h>
__BEGIN_DECLS
typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
#define NCCS 32
struct termios {
tcflag_t c_iflag; /* input ... |
willmexe/opuntiaOS | kernel/include/libkern/bits/sys/select.h | <reponame>willmexe/opuntiaOS
#ifndef _KERNEL_LIBKERN_BITS_SYS_SELECT_H
#define _KERNEL_LIBKERN_BITS_SYS_SELECT_H
#include <libkern/types.h>
#define FD_SETSIZE 8
struct fd_set {
uint8_t fds[FD_SETSIZE / 8];
};
typedef struct fd_set fd_set_t;
#define FD_SET(fd, fd_set_ptr) ((fd_set_ptr)->fds[fd / 8] |= (1 << (fd ... |
willmexe/opuntiaOS | kernel/include/platform/generic/tasking/trapframe.h | #ifdef __i386__
#include <platform/x86/tasking/trapframe.h>
#elif __arm__
#include <platform/aarch32/tasking/trapframe.h>
#endif |
willmexe/opuntiaOS | kernel/kernel/platform/aarch32/target/cortex-a15/mapping_layout.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/vmm.h>
#include <platform/aarch32/target/cortex-a15/device_setting... |
willmexe/opuntiaOS | userland/system/homescreen/AppListView.h | <gh_stars>100-1000
#pragma once
#include <libg/Font.h>
#include <libui/Label.h>
#include <libui/PopupMenu.h>
#include <libui/View.h>
#include <list>
#include <string>
#include <unistd.h>
class AppListView : public UI::View {
UI_OBJECT();
static constexpr int INVALID = -1;
public:
AppListView(View* superv... |
willmexe/opuntiaOS | libs/libc/include/sys/types.h | <filename>libs/libc/include/sys/types.h
#ifndef _LIBC_SYS_TYPES_H
#define _LIBC_SYS_TYPES_H
#include <sys/_types/_devs.h>
#include <sys/_types/_ints.h>
#include <sys/_types/_va_list.h>
#endif /* _LIBC_SYS_TYPES_H */ |
willmexe/opuntiaOS | kernel/kernel/platform/x86/vmm/pte.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 <mem/vmm.h>
#include <platform/x86/vmm/pte.h>
void page_desc_init(page_desc_t* pte)
{
*pte = 0;... |
willmexe/opuntiaOS | kernel/include/mem/bits/vm.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_BITS_VM_H
#define _KERNEL_MEM_BITS_VM_H
#include <platform/generic/vmm/consts.h>
#includ... |
willmexe/opuntiaOS | libs/libfoundation/include/libfoundation/json/Lexer.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 <cctype>
#include <string>
#include <unistd.h>
namespace LFoundation::Json {
class L... |
willmexe/opuntiaOS | servers/window_server/src/Managers/InitManager.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.
*/
#pragma once
#include "../Components/ControlBar/ControlBar.h"
#include "../Comp... |
willmexe/opuntiaOS | userland/system/applist/AppListView.h | #pragma once
#include "DockEntity.h"
#include "IconView.h"
#include "WindowEntity.h"
#include <libg/Font.h>
#include <libui/StackView.h>
#include <libui/View.h>
#include <list>
#include <string>
class AppListView : public UI::View {
UI_OBJECT();
public:
AppListView(UI::View* superview, const LG::Rect& frame);... |
willmexe/opuntiaOS | kernel/kernel/platform/x86/tasking/trapframe.c | <gh_stars>100-1000
#include <platform/x86/tasking/trapframe.h> |
willmexe/opuntiaOS | kernel/include/drivers/x86/ata.h | <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.
*/
#ifndef _KERNEL_DRIVERS_X86_ATA_H
#define _KERNEL_DRIVERS_X86_ATA_H
#include <drivers/dri... |
willmexe/opuntiaOS | libs/libc/include/bits/thread.h | #ifndef _LIBC_BITS_THREAD_H
#define _LIBC_BITS_THREAD_H
#include <sys/types.h>
struct thread_create_params {
uint32_t entry_point;
uint32_t stack_start;
uint32_t stack_size;
};
typedef struct thread_create_params thread_create_params_t;
#endif // _LIBC_BITS_THREAD_H |
willmexe/opuntiaOS | test/kernel/env/main.c | #include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int main(int argc, char** argv)
{
if (getenv("OSTEST")) {
char* res = getenv("GO");
if (!res) {
TestErr("Empty GO env var.");
}
if (strncmp(res, "go", 2)) {
Tes... |
willmexe/opuntiaOS | kernel/include/algo/hash.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_HASH_H
#define _KERNEL_ALGO_HASH_H
#include <libkern/types.h>
#define hashint(hfunc, v... |
willmexe/opuntiaOS | libs/libc/init/_init.c | <filename>libs/libc/init/_init.c
extern void _libc_init(int argc, char* argv[], char* envp[]);
extern void _libc_deinit();
void _init(int argc, char* argv[], char* envp[])
{
_libc_init(argc, argv, envp);
}
void _deinit()
{
_libc_deinit();
} |
willmexe/opuntiaOS | kernel/include/libkern/bits/sys/ptrace.h | #ifndef _KERNEL_LIBKERN_BITS_SYS_PTRACE_H
#define _KERNEL_LIBKERN_BITS_SYS_PTRACE_H
#include <libkern/types.h>
typedef int ptrace_request_t;
#define PTRACE_TRACEME (0x1)
#define PTRACE_CONT (0x2)
#define PTRACE_PEEKTEXT (0x3)
#define PTRACE_PEEKDATA (0x4)
#endif // _KERNEL_LIBKERN_BITS_SYS_PTRACE_H
|
willmexe/opuntiaOS | kernel/include/platform/aarch32/tasking/context.h | <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.
*/
#ifndef _KERNEL_PLATFORM_AARCH32_TASKING_CONTEXT_H
#define _KERNEL_PLATFORM_AARCH32_TASKIN... |
willmexe/opuntiaOS | kernel/kernel/platform/x86/tasking/dump_impl.c | <reponame>willmexe/opuntiaOS<filename>kernel/kernel/platform/x86/tasking/dump_impl.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/log.h>... |
willmexe/opuntiaOS | kernel/kernel/syscalls/ptrace.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 <libkern/bits/errno.h>
#include <libkern/bits/sys/ptrace.h>
#include <l... |
willmexe/opuntiaOS | libs/libfoundation/include/libfoundation/json/Object.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 <cassert>
#include <cstddef>
#include <map>
#include <string>
#include <vector>
names... |
willmexe/opuntiaOS | libs/libc/include/time.h | <filename>libs/libc/include/time.h<gh_stars>100-1000
#ifndef _LIBC_TIME_H
#define _LIBC_TIME_H
#include <bits/time.h>
#include <fcntl.h>
#include <stddef.h>
#include <sys/cdefs.h>
#include <sys/types.h>
__BEGIN_DECLS
time_t time(time_t* timep);
char* asctime(const tm_t* tm);
char* asctime_r(const tm_t* tm, char* buf... |
willmexe/opuntiaOS | kernel/include/platform/aarch32/target/cortex-a15/device_settings.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_AARCH32_TARGET_CORTEX_A15_DEVICE_SETTINGS_H
#define _KERNEL_PLATFORM_AARCH32_TARGET_... |
willmexe/opuntiaOS | test/kernel/fs/dirfile/main.c | <filename>test/kernel/fs/dirfile/main.c<gh_stars>100-1000
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
char buf[512];
int main(int argc, char** argv)
{
int fd;
fd = open("dirfile", 0);
if (fd >= 0) {
TestErr("create dirfile succeeded");
}
... |
willmexe/opuntiaOS | boot/libboot/mem/mem.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_LIBBOOT_MEM_MEM_H
#define _BOOT_LIBBOOT_MEM_MEM_H
#include <libboot/types.h>
int strcmp(const... |
willmexe/opuntiaOS | kernel/include/platform/aarch32/pmm/settings.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 _KERNEL_PLATFORM_AARCH32_PMM_SETTINGS_H
#define _KERNEL_PLATFORM_AARCH32... |
willmexe/opuntiaOS | libs/libc/include/bits/types.h | <gh_stars>100-1000
#ifndef _LIBC_BITS_TYPES_H
#define _LIBC_BITS_TYPES_H
typedef char __int8_t;
typedef short __int16_t;
typedef int __int32_t;
typedef long long __int64_t;
typedef unsigned char __uint8_t;
typedef unsigned short __uint16_t;
typedef unsigned int __uint32_t;
typedef unsigned long long __uint64_t;
typed... |
willmexe/opuntiaOS | servers/window_server/src/Target/Desktop/Window.h | <filename>servers/window_server/src/Target/Desktop/Window.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 "../../Components/Base/Base... |
willmexe/opuntiaOS | kernel/kernel/syscalls/io.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 <io/shared_buffer/shared_buffer.h>
#include <io/sockets/local_socket.h>... |
willmexe/opuntiaOS | kernel/kernel/mem/vm_alloc.c | <filename>kernel/kernel/mem/vm_alloc.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 <mem/pmm.h>
#include <mem/vm_alloc.h>
#include <me... |
willmexe/opuntiaOS | boot/aarch32/drivers/uart.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_DRIVERS_UART_H
#define _BOOT_DRIVERS_UART_H
#include <libboot/types.h>
void uart_init();
int ... |
willmexe/opuntiaOS | libs/libobjc/include/libobjc/helpers.h | <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.
*/
#ifndef _LIBOBJC_HELPERS_H
#define _LIBOBJC_HELPERS_H
#include <stdio.h>
#define OBJC_EX... |
willmexe/opuntiaOS | libs/libc/posix/fs.c | <filename>libs/libc/posix/fs.c
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/select.h>
#include <sys/stat.h>
#include <sysdep.h>
#include <unistd.h>
int open(const char* pathname, int flags)
{
int res = DO_SYSCALL_3(SYS_OPEN, pathname, flags, S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO);
RETURN_WITH_ERRNO(r... |
willmexe/opuntiaOS | boot/aarch32/drivers/pl181.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 "pl181.h"
#include <libboot/devtree/devtree.h>
#include <libboot/log/log.h>
// #define DEBUG_PL181
... |
willmexe/opuntiaOS | userland/utilities/uname/main.c | <gh_stars>100-1000
#include <stdio.h>
#include <string.h>
#include <sys/utsname.h>
#include <unistd.h>
int main(int argc, char** argv)
{
int fd, i;
utsname_t uts;
int rc = uname(&uts);
if (rc < 0) {
return 1;
}
int flag_s = 0;
int flag_n = 0;
int flag_r = 0;
int flag_m = 0... |
willmexe/opuntiaOS | kernel/include/mem/pmm.h | #ifndef _KERNEL_MEM_PMM_H
#define _KERNEL_MEM_PMM_H
#include <algo/bitmap.h>
#include <libkern/types.h>
#include <mem/boot.h>
#include <platform/generic/pmm/settings.h>
struct pmm_state {
size_t kernel_va_base;
size_t kernel_size;
bitmap_t mat;
boot_desc_t* boot_desc;
size_t ram_size;
size_t... |
willmexe/opuntiaOS | kernel/include/drivers/x86/bga.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_DRIVERS_X86_BGA_H
#define _KERNEL_DRIVERS_X86_BGA_H
#include <drivers/driver_manager.h>
#inc... |
willmexe/opuntiaOS | kernel/include/drivers/bits/device.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_DRIVERS_BITS_DEVICE_H
#define _KERNEL_DRIVERS_BITS_DEVICE_H
#include <libkern/types.h>
enum... |
willmexe/opuntiaOS | kernel/include/libkern/bits/sys/wait.h | #ifndef _KERNEL_LIBKERN_BITS_SYS_WAIT_H
#define _KERNEL_LIBKERN_BITS_SYS_WAIT_H
#define WNOHANG 0x1
#define WUNTRACED 0x2
#endif // _KERNEL_LIBKERN_BITS_SYS_WAIT_H |
willmexe/opuntiaOS | libs/libui/include/libui/Constants/Layout.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::LayoutConstraints {
enum class Axis {
Horizontal,
Vertical
};
} // name... |
willmexe/opuntiaOS | servers/window_server/src/Constants/Colors.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 <sys/types.h>
namespace WinServer {
enum Color {
Shadow = 0xf4000000,
Inacti... |
willmexe/opuntiaOS | kernel/kernel/libkern/scanf.c | #include <libkern/ctype.h>
#include <libkern/scanf.h>
#include <libkern/stdarg.h>
typedef scanf_lookupch_callback _lookupch_callback;
typedef scanf_getch_callback _getch_callback;
typedef scanf_putch_callback _putch_callback;
static int _scanf_u32(_lookupch_callback lookupch, _getch_callback getch, void* callback_par... |
willmexe/opuntiaOS | libs/libc/include/opuntia/shared_buffer.h | <filename>libs/libc/include/opuntia/shared_buffer.h
#ifndef _LIBC_SYS_SHARED_BUFFER_H
#define _LIBC_SYS_SHARED_BUFFER_H
#include <bits/sys/select.h>
#include <bits/time.h>
#include <stddef.h>
#include <sys/cdefs.h>
#include <sys/types.h>
__BEGIN_DECLS
int shared_buffer_create(uint8_t** buffer, size_t size);
int shar... |
willmexe/opuntiaOS | test/kernel/fs/procfs/main.c | <filename>test/kernel/fs/procfs/main.c
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int main(int argc, char** argv)
{
int fd = 0;
fd = open("/proc/stat", O_RDWR);
if (fd > 0) {
TestErr("Opened /proc/stat for write");
}
fd = open("/proc/... |
willmexe/opuntiaOS | libs/libfoundation/include/libfoundation/EventReceiver.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 <libfoundation/Event.h>
#include <memory>
namespace LFoundation {
class EventReceive... |
willmexe/opuntiaOS | libs/libc/include/stddef.h | <filename>libs/libc/include/stddef.h
#ifndef _LIBC_STDDEF_H
#define _LIBC_STDDEF_H
#include <sys/cdefs.h>
#include <sys/types.h>
__BEGIN_DECLS
#ifdef __i386__
#if defined(__clang__)
typedef unsigned int size_t;
typedef int ssize_t;
typedef int ptrdiff_t;
#elif defined(__GNUC__) || defined(__GNUG__)
typedef unsigned ... |
willmexe/opuntiaOS | kernel/include/libkern/bits/sys/utsname.h | <gh_stars>100-1000
#ifndef _KERNEL_LIBKERN_BITS_SYS_UTSNAME_H
#define _KERNEL_LIBKERN_BITS_SYS_UTSNAME_H
#define UTSNAME_ENTRY_LEN 65
struct utsname {
char sysname[UTSNAME_ENTRY_LEN];
char nodename[UTSNAME_ENTRY_LEN];
char release[UTSNAME_ENTRY_LEN];
char version[UTSNAME_ENTRY_LEN];
char machine[U... |
willmexe/opuntiaOS | userland/utilities/touch/main.c | #include <fcntl.h>
#include <sys/stat.h>
#include <unistd.h>
int main(int argc, char** argv)
{
int fd;
if (argc < 2) {
write(1, "Usage: touch files...\n", 22);
return 0;
}
mode_t std_mode = S_IFREG | S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
for (int i ... |
willmexe/opuntiaOS | kernel/include/tasking/cpu.h | <filename>kernel/include/tasking/cpu.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_CPU_H
#define _KERNEL_TASKING_CPU_H
#include ... |
willmexe/opuntiaOS | kernel/kernel/drivers/aarch32/pl031.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/aarch32/pl031.h>
#include <drivers/devtree.h>
#include <fs/devfs/devfs.h>
#include <fs/vfs.... |
willmexe/opuntiaOS | kernel/kernel/drivers/x86/ata.c | <filename>kernel/kernel/drivers/x86/ata.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/ata.h>
#include <libkern/bits/errno.h>
ata_t... |
willmexe/opuntiaOS | test/bench/common.h | <reponame>willmexe/opuntiaOS
#pragma once
#include <ctime>
#include <sys/time.h>
#define RUN_BENCH(name, x) for (bench_run = 0, bench_pno = bench_no, gettimeofday(&tv, &tz); bench_run < x; gettimeofday(&ttv, &tz), printf("[BENCH][%s] %d (usec)\n", name, to_usec()), fflush(stdout), bench_run++, gettimeofday(&tv, &tz))... |
willmexe/opuntiaOS | libs/libc/include/sys/stat.h | #ifndef _LIBC_SYS_STAT_H
#define _LIBC_SYS_STAT_H
#include <bits/sys/stat.h>
#include <sys/cdefs.h>
#include <sys/types.h>
__BEGIN_DECLS
int mkdir(const char* path);
int fstat(int nfds, fstat_t* stat);
__END_DECLS
#endif |
willmexe/opuntiaOS | kernel/kernel/mem/kswapd.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/vfs.h>
#include <libkern/bits/errno.h>
#include <libkern/log.h>
#include <mem/kswapd... |
willmexe/opuntiaOS | libs/libc/include/sys/utsname.h | #ifndef _LIBC_SYS_UTSNAME_H
#define _LIBC_SYS_UTSNAME_H
#include <bits/sys/utsname.h>
#include <sys/cdefs.h>
__BEGIN_DECLS
int uname(utsname_t* buf);
__END_DECLS
#endif // _LIBC_SYS_UTSNAME_H |
willmexe/opuntiaOS | userland/utilities/edit/viewer.c | <filename>userland/utilities/edit/viewer.c
#include "viewer.h"
#include "file.h"
#include <stdlib.h>
#include <unistd.h>
int out_x, out_y;
int cursor_x, cursor_y;
char* displaying_buffer;
int working_with_offset;
static int _viewer_get_offset(int cx, int cy)
{
return cy * SCREEN_X + cx;
}
void viewer_clear_scree... |
willmexe/opuntiaOS | userland/utilities/kill/main.c | #include <fcntl.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char** argv)
{
if (argc <= 2) {
return 0;
}
printf("%d %d", atoi(argv[1]), atoi(argv[2]));
kill(atoi(argv[1]), atoi(argv[2]));
return 0;
} |
willmexe/opuntiaOS | servers/window_server/src/Devices/Screen.h | <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.
*/
#pragma once
#include <libg/Color.h>
#include <libg/PixelBitmap.h>
#include <memory>
name... |
willmexe/opuntiaOS | libs/libc/ctype/ctype.c | #include <ctype.h>
const char __ctypes[256] = {
_C, _C, _C, _C, _C, _C, _C, _C,
_C, _C | _S, _C | _S, _C | _S, _C | _S, _C | _S, _C, _C,
_C, _C, _C, _C, _C, _C, _C, _C,
_C, _C, _C, _C, _C, _C, _C, _C,
(char)(_S | _B), _P, _P, _P, _P, _P, _P, _P,
_P, _P, _P, _P, _P, _P, _P, _P,
_N, _N, _N, _... |
willmexe/opuntiaOS | userland/utilities/edit/file.c | #include "file.h"
#include "viewer.h"
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
file_view_area_t view_area;
static int _file_get_size_of_first_line()
{
int res = 0;
for (int i = view_area.start; i < view_area.data_len; i++) {
res++;
if (view_area.buffer[i] ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.