summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README.md28
-rw-r--r--src/libPOSIXWrapper/POSIXKit/POSIX.h24
-rw-r--r--src/libPOSIXWrapper/POSIXKit/unistd.h17
-rw-r--r--src/libPOSIXWrapper/src/POSIX.cpp7
-rw-r--r--src/libPThread/PThreadKit/Thread.h17
-rw-r--r--src/libPThread/PThreadKit/pthread.h11
6 files changed, 63 insertions, 41 deletions
diff --git a/README.md b/README.md
index ae217cae..4c2e4aab 100644
--- a/README.md
+++ b/README.md
@@ -1,15 +1,15 @@
<!-- Read Me of NeKernel -->
-<div align="center">
- <h1>
- <b>🍯 The NeKernel:</b>
- </h1>
- <p>
- <a href="https://github.com/ne-foss-org/nekernel/actions/workflows/boot-ahci-dev.yml/badge.svg"><img src="https://github.com/ne-foss-org/nekernel/actions/workflows/boot-ahci-dev.yml/badge.svg" alt="CI"></a>
- <a href="https://github.com/ne-foss-org/nekernel/actions/workflows/kernel-ahci-dev.yml/badge.svg"><img src="https://github.com/ne-foss-org/nekernel/actions/workflows/kernel-ahci-dev.yml/badge.svg" alt="CI"></a>
- <a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache--2.0-blue.svg" alt="License"></a>
- </p>
-</div>
+# 🍯 The NeKernel
+
+<a href="https://github.com/ne-foss-org/nekernel/actions/workflows/boot-ahci-dev.yml/badge.svg"><img src="https://github.com/ne-foss-org/nekernel/actions/workflows/boot-ahci-dev.yml/badge.svg" alt="CI"></a>
+<a href="https://github.com/ne-foss-org/nekernel/actions/workflows/kernel-ahci-dev.yml/badge.svg"><img src="https://github.com/ne-foss-org/nekernel/actions/workflows/kernel-ahci-dev.yml/badge.svg" alt="CI"></a>
+<a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache--2.0-blue.svg" alt="License"></a>
+![GitHub Repo stars](https://img.shields.io/github/stars/ne-foss-org/ne-kernel)
+
+## About:
+
+The Base OS of the NeSystem designed for portability and scalability. A hybrid system written in modern C++ for backend systems.
## Getting Started:
@@ -32,17 +32,11 @@ git clone -j8 https://github.com/ne-foss-org/nekernel.git
cd nekernel
./scripts/setup_x64_project.sh
./scripts/modules_ahci_x64.sh
-./scripts/debug_ahci_x64.sh # For debug generic AHCI target (QEMU, USB)
+./scripts/debug_ahci_x64.sh # For debug generic AHCI target (QEMU, UDF)
```
---
-## Love our work?
-
-Give us a star on GitHub!
-
-![GitHub Repo stars](https://img.shields.io/github/stars/ne-foss-org/kernel)
-
## Community:
Join our [Discord](https://discord.gg/uD76Qweght), we're quite active and open for contributors!
diff --git a/src/libPOSIXWrapper/POSIXKit/POSIX.h b/src/libPOSIXWrapper/POSIXKit/POSIX.h
new file mode 100644
index 00000000..ea2067b3
--- /dev/null
+++ b/src/libPOSIXWrapper/POSIXKit/POSIX.h
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (see LICENSE file)
+// Official repository: https://github.com/ne-foss-org/nekernel
+
+#ifndef LIBPOSIX_POSIXKIT_POSIX_H
+#define LIBPOSIX_POSIXKIT_POSIX_H
+
+#include <libSystem/SystemKit/System.h>
+
+/// @file POSIX.h
+/// @brief POSIX definitions header for the NeSystem.
+
+/// @brief Please use these macros to specify whether your function is thread safe or not.
+#define PTHREAD_UNSAFE __THREAD_UNSAFE
+#define PTHREAD_SAFE __THREAD_SAFE
+
+#define _POSIX_SOURCE __POSIX_SOURCE__
+#define _XOPEN_SOURCE __XOPEN_SOURCE__
+
+PTHREAD_UNSAFE IMPORT_C SInt64 write(SizeT count, SInt32 fd, Void* data, SizeT sz);
+PTHREAD_UNSAFE IMPORT_C SInt64 read(SizeT count, SInt32 fd, Void* data, SizeT sz);
+
+#endif // LIBPOSIX_POSIXKIT_POSIX_H
diff --git a/src/libPOSIXWrapper/POSIXKit/unistd.h b/src/libPOSIXWrapper/POSIXKit/unistd.h
index 0e133c89..96701f35 100644
--- a/src/libPOSIXWrapper/POSIXKit/unistd.h
+++ b/src/libPOSIXWrapper/POSIXKit/unistd.h
@@ -3,19 +3,6 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/ne-foss-org/nekernel
-#ifndef LIBPOSIX_POSIXKIT_UNISTD_H
-#define LIBPOSIX_POSIXKIT_UNISTD_H
+#pragma once
-#include <libSystem/SystemKit/System.h>
-
-/// @file Unistd.h
-/// @brief POSIX Standard Header for NeKernel.
-
-#define _POSIX_SOURCE __POSIX_SOURCE__
-#define _XOPEN_SOURCE __XOPEN_SOURCE__
-
-IMPORT_C SInt64 write(SizeT count, SInt32 fd, Void* data, SizeT sz);
-
-IMPORT_C SInt64 read(SizeT count, SInt32 fd, Void* data, SizeT sz);
-
-#endif // LIBPOSIX_POSIXKIT_UNISTD_H
+#include <libPOSIXWrapper/POSIXKit/POSIX.h>
diff --git a/src/libPOSIXWrapper/src/POSIX.cpp b/src/libPOSIXWrapper/src/POSIX.cpp
new file mode 100644
index 00000000..fda4355b
--- /dev/null
+++ b/src/libPOSIXWrapper/src/POSIX.cpp
@@ -0,0 +1,7 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (see LICENSE file)
+// Official repository: https://github.com/ne-foss-org/nekernel
+
+#include <libPOSIXWrapper/POSIXKit/POSIX.h>
+
diff --git a/src/libPThread/PThreadKit/Thread.h b/src/libPThread/PThreadKit/Thread.h
index de8efe8a..02c1a574 100644
--- a/src/libPThread/PThreadKit/Thread.h
+++ b/src/libPThread/PThreadKit/Thread.h
@@ -8,16 +8,15 @@
#include <libPOSIXWrapper/POSIXKit/unistd.h>
-/// @brief Please use these macros to specify whether your function is thread safe or not.
-#define PTHREAD_UNSAFE __THREAD_UNSAFE
-#define PTHREAD_SAFE __THREAD_SAFE
+/// @internal Internal type, please do not rely on it for multi-platform builds.
+typedef ThreadRef pthread_ref_t;
-PTHREAD_SAFE SInt32 pthread_create(_Output ThreadRef* thread, VoidPtr attr,
+PTHREAD_SAFE IMPORT_C SInt32 pthread_create(_Output pthread_ref_t* thread, VoidPtr attr,
VoidPtr (*start_routine)(VoidPtr), VoidPtr arg);
-PTHREAD_SAFE SInt32 pthread_join(ThreadRef thread, VoidPtr* retval);
-PTHREAD_SAFE SInt32 pthread_exit(SInt32 retval);
-PTHREAD_SAFE SInt32 pthread_detach(ThreadRef thread);
-PTHREAD_SAFE ThreadRef pthread_self(Void);
-PTHREAD_SAFE SInt32 pthread_yield(void);
+PTHREAD_SAFE IMPORT_C SInt32 pthread_join(pthread_ref_t thread, VoidPtr* retval);
+PTHREAD_SAFE IMPORT_C SInt32 pthread_exit(SInt32 retval);
+PTHREAD_SAFE IMPORT_C SInt32 pthread_detach(pthread_ref_t thread);
+PTHREAD_SAFE IMPORT_C pthread_ref_t pthread_self(Void);
+PTHREAD_SAFE IMPORT_C SInt32 pthread_yield(void);
#endif // LIBPOSIX_POSIXKIT_THREAD_H
diff --git a/src/libPThread/PThreadKit/pthread.h b/src/libPThread/PThreadKit/pthread.h
new file mode 100644
index 00000000..2448c458
--- /dev/null
+++ b/src/libPThread/PThreadKit/pthread.h
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: Apache-2.0
+// Copyright 2026, Amlal El Mahrouss (amlal@nekernel.org)
+// Licensed under the Apache License, Version 2.0 (see LICENSE file)
+// Official repository: https://github.com/ne-foss-org/nekernel
+
+#ifndef LIBPOSIX_POSIXKIT_PTHREAD_H
+#define LIBPOSIX_POSIXKIT_PTHREAD_H
+
+#include <libPThread/ThreadKit/Thread.h>
+
+#endif