mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 19:57:45 +03:00
LibC: Add sched_yield(), needed for GCC 8.3.0 build.
This commit is contained in:
parent
a9d09e9020
commit
f9d3abf5d0
Notes:
sideshowbarker
2024-07-19 14:37:36 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/f9d3abf5d04
@ -43,7 +43,8 @@ LIBC_OBJS = \
|
||||
poll.o \
|
||||
locale.o \
|
||||
arpa/inet.o \
|
||||
netdb.o
|
||||
netdb.o \
|
||||
sched.o
|
||||
|
||||
ASM_OBJS = setjmp.no crti.ao crtn.ao
|
||||
|
||||
|
14
LibC/sched.cpp
Normal file
14
LibC/sched.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
#include <Kernel/Syscall.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
int sched_yield()
|
||||
{
|
||||
int rc = syscall(SC_yield);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
}
|
||||
|
9
LibC/sched.h
Normal file
9
LibC/sched.h
Normal file
@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
int sched_yield();
|
||||
|
||||
__END_DECLS
|
Loading…
Reference in New Issue
Block a user