mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
LibC: Add getpriority() and setpriority() stubs
Expected behavior left as a FIXME is outlined here: https://pubs.opengroup.org/onlinepubs/7908799/xsh/getpriority.html
This commit is contained in:
1 parent
a6539cc031
commit
380c42c405
3 files changed
+31
No files matched your search
@@ -22,6 +22,7 @@ set(LIBC_SOURCES
|
||||
net.cpp
|
||||
netdb.cpp
|
||||
poll.cpp
|
||||
priority.cpp
|
||||
pthread_forward.cpp
|
||||
pthread_integration.cpp
|
||||
pthread_tls.cpp
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) 2021, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/Format.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
int getpriority([[maybe_unused]] int which, [[maybe_unused]] id_t who)
|
||||
{
|
||||
dbgln("FIXME: Implement getpriority()");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int setpriority([[maybe_unused]] int which, [[maybe_unused]] id_t who, [[maybe_unused]] int value)
|
||||
{
|
||||
dbgln("FIXME: Implement setpriority()");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -58,4 +58,11 @@ struct rlimit {
|
||||
int getrlimit(int, struct rlimit*);
|
||||
int setrlimit(int, struct rlimit const*);
|
||||
|
||||
#define PRIO_PROCESS 0
|
||||
#define PRIO_PGRP 1
|
||||
#define PRIO_USER 2
|
||||
|
||||
int getpriority(int, id_t);
|
||||
int setpriority(int, id_t, int);
|
||||
|
||||
__END_DECLS
|
||||
Reference in new issue
Block a user