1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:48:12 +00:00
serenity/Libraries/LibPthread
Andreas Kling 24c736b0e7 Kernel: Use the Syscall string and buffer types more
While I was updating syscalls to stop passing null-terminated strings,
I added some helpful struct types:

    - StringArgument { const char*; size_t; }
    - ImmutableBuffer<Data, Size> { const Data*; Size; }
    - MutableBuffer<Data, Size> { Data*; Size; }

The Process class has some convenience functions for validating and
optionally extracting the contents from these structs:

    - get_syscall_path_argument(StringArgument)
    - validate_and_copy_string_from_user(StringArgument)
    - validate(ImmutableBuffer)
    - validate(MutableBuffer)

There's still so much code around this and I'm wondering if we should
generate most of it instead. Possible nice little project.
2020-01-11 12:47:47 +01:00
..
Makefile Build: clean up build system, use one shared Makefile 2019-12-20 20:20:54 +01:00
pthread.cpp Kernel: Use the Syscall string and buffer types more 2020-01-11 12:47:47 +01:00
pthread.h Kernel+LibPthread+LibC: Add a naive futex and use it for pthread_cond_t 2019-12-25 23:54:06 +01:00