mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +00:00
Kernel: Add getrusage() syscall
Only the two timeval fields are maintained, as required by the POSIX standard.
This commit is contained in:
parent
39bfc48ea7
commit
839d3d9f74
Notes:
sideshowbarker
2024-07-17 18:06:29 +09:00
Author: https://github.com/LucasChollet
Commit: 839d3d9f74
Pull-request: https://github.com/SerenityOS/serenity/pull/12244
Issue: https://github.com/SerenityOS/serenity/issues/1140
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/bgianfo ✅
Reviewed-by: https://github.com/linusg
5 changed files with 83 additions and 2 deletions
40
Kernel/API/POSIX/sys/resource.h
Normal file
40
Kernel/API/POSIX/sys/resource.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Lucas Chollet <lucas.chollet@free.fr>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Kernel/API/POSIX/sys/time.h>
|
||||
#include <Kernel/API/POSIX/sys/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct rusage {
|
||||
struct timeval ru_utime;
|
||||
struct timeval ru_stime;
|
||||
long ru_maxrss;
|
||||
long ru_ixrss;
|
||||
long ru_idrss;
|
||||
long ru_isrss;
|
||||
long ru_minflt;
|
||||
long ru_majflt;
|
||||
long ru_nswap;
|
||||
long ru_inblock;
|
||||
long ru_oublock;
|
||||
long ru_msgsnd;
|
||||
long ru_msgrcv;
|
||||
long ru_nsignals;
|
||||
long ru_nvcsw;
|
||||
long ru_nivcsw;
|
||||
};
|
||||
|
||||
#define RUSAGE_SELF 1
|
||||
#define RUSAGE_CHILDREN 2
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue