Commit graph

40 commits

Author SHA1 Message Date
fef
faa99622df
malloc: check for underflow in blk_slice 2021-08-09 23:06:50 +02:00
fef
f5590becd3
syscall: add sleep system call 2021-08-09 19:20:40 +02:00
fef
02ed1b5779
malloc: mask flags for neighbor offset 2021-08-09 19:18:26 +02:00
fef
f85006f224
malloc: remove obsolete assert statements
A relict of debugging on my host.
2021-08-09 04:05:07 +02:00
fef
8e9678577e
malloc: fix my shit code so it's less shitty
The allocator works now.
At least when i compile it for amd64.
I haven't actually flashed it yet tho lmao.
2021-08-09 04:03:54 +02:00
fef
59db5471ed
malloc: rewrite with atomic support 2021-08-08 20:49:42 +02:00
fef
7e6dbad05f
sched: complete rework of context switching
The old strategy was to only do context switching
from within the PendSV handler.  This worked fine
until now because all syscalls were handled either
atomically or just returned -EAGAIN if the
resource was locked or busy.  However, with the
introduction of I/O wait, we need to be able to
sleep directly from within the kernel by moving
the context switching completely into the kernel.
2021-08-08 20:48:55 +02:00
fef
6d886d7252
syscall: refactor names 2021-08-05 16:15:35 +02:00
fef
1b1e48e54b
printf: simplify address expressions 2021-08-03 21:15:28 +02:00
fef
528785d40e
malloc: track memory usage and clarify docs 2021-08-03 17:35:58 +02:00
fef
c81ea7e7fd
printf: don't ignore return value of last write() 2021-08-01 19:04:03 +02:00
fef
4db1702078
stdio: refactor printk to printf and friends 2021-08-01 18:53:22 +02:00
fef
643d3ed251
build: migrate to CMake 2021-07-31 19:39:51 +02:00
f0dc3a3433
kiss capitalism goodbye for good
The CNPL will make sure that absolutely no corporation is going to get
anywhere near Ardix -- exactly as it should be.  Fuck you, corporations!
2021-05-10 16:19:38 +02:00
ec3b64d232
string: move header to standard location
Anything that implements POSIX should also be where POSIX defines
it to be, otherwise it would be pretty useless lol
2021-02-28 18:27:43 +01:00
a1d594f0bd
malloc: get rid of unnecessary stuff 2021-02-28 18:11:00 +01:00
298433e15f
fix the stupid symbol attribute mess, pt. 1 2021-02-28 18:08:08 +01:00
af8210da4a
piss off capitalism
Ardix is being relicensed to GPL v3 or later. I have no idea whether you
can just do this if you feel like it or if it has any consequences, but
i kinda don't really care that much about it.  Any changes made after
this commit will definitely fall under the GPL though, and considering
that only few things are really working yet anyways this is good enough
for me.
2021-02-28 02:18:39 +01:00
b8c4593fc5
syscall: use vararg declaration 2021-02-17 14:30:24 +01:00
Felix Kopp
e79f9d5165
errno: implement strerror
i defo need to check my priorities but i wanted to play around with
awk and the errno cli tool so leave me alone
2021-02-03 04:58:04 +01:00
Felix Kopp
f7cbcc924b
malloc: get rid of bloat
the without_lsb macro was nice and all, but really not necessary.
It was used in only 3 places or so and is even longer than the current
code it is replaced with.
2021-02-03 04:04:08 +01:00
Felix Kopp
4a3e33dc05
sycall: conform to POSIX 2021-01-07 12:29:45 +01:00
Felix Kopp
63ccd87112
arch/at91sam3x8e: finalize entry routine 2021-01-05 17:31:26 +01:00
Felix Kopp
8252f14b6b
arch/at91sam3x8e: use r0 for syscall number 2021-01-05 15:30:36 +01:00
Felix Kopp
dee9ce667f
write: actually write to the serial console 2021-01-05 14:40:18 +01:00
Felix Kopp
e439172025
user: store libc routines in separate section 2021-01-05 13:59:44 +01:00
Felix Kopp
cc00a7a1ea
atom: Replace spinlocks with atoms 2020-12-08 12:55:23 +01:00
Felix Kopp
b5dc88c966
malloc: make malloc/free atomic 2020-12-02 00:00:05 +01:00
Felix Kopp
056c318e86
Make memcmp more compiler friendly
The Thumb ISA allows incrementing a pointer right after dereferencing
it.  This commit attempts to make it more obvious to the compiler to use
this instruction in memcmp().
2020-11-19 16:33:40 +01:00
Felix Kopp
fd75357944
Add list empty check in malloc 2020-10-24 17:44:18 +02:00
Felix Kopp
32afd10e99
Minor macro refactor 2020-10-14 11:47:42 +00:00
Felix Kopp
bdf3f008d7
Final refactor, initialize allocator on init 2020-10-12 17:54:07 +02:00
Felix Kopp
fc75cb2014
Refactor and make the allocator work 2020-10-12 15:35:10 +02:00
Felix Kopp
cd833dbbdf
Disallow double-freeing the same pointer 2020-10-12 12:47:20 +02:00
Felix Kopp
0cfc979109
Fix operator precedence bug 2020-10-12 01:20:16 +02:00
Felix Kopp
0e725b795d
Move license comment to the bottom 2020-10-11 19:35:30 +02:00
Felix Kopp
9dfce93c57
Add memory allocator implementation 2020-10-11 19:08:20 +02:00
Felix Kopp
a4e244e7fc
Fix some minor errors 2020-10-10 23:11:21 +02:00
Felix Kopp
7a6c34b14e
Implement ctype.h 2020-06-14 10:43:06 +02:00
Felix Kopp
dfd949efdd
Add stupid string.h implementation 2020-06-12 00:01:15 +02:00