#
7d961f97 |
|
09-Jun-2021 |
Jérôme Duval <jerome.duval@gmail.com> |
sys/resource.h: add rusage compatibility fields, set to zero POSIX defines this structure but specifies only two fields (which we already implement). However, both the *BSD and Linux have agreed on some more fields, which are often assumed to be there by applications. The benefice of having compatibility fields is greater as having to patch every other software at HaikuPorts. Change-Id: Ie28ca2e348aa16b4c57eb3498eb62175100d9b9d Reviewed-on: https://review.haiku-os.org/c/haiku/+/4083 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com> Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
|
#
8ae2e956 |
|
08-Jan-2019 |
Timothy Gu <timothygu99@gmail.com> |
libroot: add [gs]etpriority implementation Implemented against POSIX-1.2013. The implementation POSIX requirement thats setpriority() shall affect the priority of all system scope threads only extends to POSIX threads. This is implemented by modifying the default attributes for newly spawned pthreads. It is not possible to modify the default pthread attributes for different processes with the current implementation, as default pthread attributes are implemented in user-space. As a result, PRIO_PROCESS for which and 0 for who is the only supported combination for setpriority(). While it is possible to move the default attributes to the kernel, it is chosen not to so as to keep the pthread implementation user-space only. POSIX requires that lowering the nice value (increasing priority) can be done only by processes with appropriate privileges. However, as Haiku currently doesn't harbor any restrictions in setting the thread priority, this is not implemented. It is possible to have small precision errors when converting from Unix- style thread priority to Be-style. For example, the following program outputs "17" instead of the expected "18": #include <stdio.h> #include <sys/resource.h> int main() { setpriority(PRIO_PROCESS, 0, 18); printf("%d\n", getpriority(PRIO_PROCESS, 0)); return 0; } The underlying reason is because when you setpriority() both 18 and 19 are converted to the Be-style "2". This problem should not happen with priority levels lower than or equal to 20, when the Be notation is more precise than the Unix-style. Done as a part of GCI 2014. Fixes #2817. Signed-off-by: Timothy Gu <timothygu99@gmail.com> Co-authored-by: Leorize <leorize+oss@disroot.org> Change-Id: Ie14f105b00fe8563d16b3562748e1c2e56c873a6 Reviewed-on: https://review.haiku-os.org/c/78 Reviewed-by: Jérôme Duval <jerome.duval@gmail.com> Reviewed-by: waddlesplash <waddlesplash@gmail.com>
|
#
173f54f1 |
|
19-Jul-2012 |
Matt Madia <mattmadia@gmail.com> |
Updated copyright in headers. No functional change.
|
#
0fae8733 |
|
03-Nov-2010 |
Scott McCreary <scottmc2@gmail.com> |
Updated posix headers to remove commas from copyright line, to match the preferred coding guidelines. Cleaned up some header style violations, making sure there are two blank lines after the header guards. This fixes the posix header part of #2191. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39288 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cfcee452 |
|
22-Dec-2009 |
Colin Günther <coling@gmx.de> |
Whitespace cleanup, no functional change. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34748 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2222d055 |
|
24-Nov-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Introduced new header directory "config", which ATM contains HaikuConfig.h and types.h. The idea is to provide a basic architecture/compiler abstraction by defining types and macros that allow the posix/ and os/ headers to be mostly architecture/compiler agnostic. * Adjusted the posix/ and os/ headers accordingly. * <SupportDefs.h>: Introduced B_PRI* and B_SCN* macros similar to the PRI* and SCN* macros defined in <inttypes.h>, just for the BeOS/Haiku [u]int* types and some POSIX types (e.g. off_t, dev_t, ino_t) that don't have POSIX macros. Also the B_PRI* and B_SCN* macros are available unconditionally, unlike the <inttypes.h> macros, which require __STDC_FORMAT_MACROS to be defined in C++ mode. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34214 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
46110637 |
|
10-Aug-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
* Fix year in license git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26922 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4093d16d |
|
10-Aug-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
* updating license * use _{BEGIN|END}_DECL macro instead of ifdef C++ git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26921 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b9320128 |
|
10-May-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Patch by Andreas Faerber: Replaced single-line comments by multi-line comments for ANSI C compliance. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25433 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c2be814a |
|
22-May-2006 |
François Revol <revol@free.fr> |
added an Haiku-specific RLIMIT (NumOpenVnodeMONitors) (UNIMPLEMENTED yet) (we might want to renumber it), and used that one and NOFILE to implement R5 private calls _kset_[fd|mon]_limit_() git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17545 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
14701025 |
|
21-Sep-2003 |
Axel Dörfler <axeld@pinc-software.de> |
change variable name to better fit its purpose. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4775 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
051f8828 |
|
21-Sep-2003 |
Axel Dörfler <axeld@pinc-software.de> |
Rewrote the resource.h header and added comments about missing functions and functionality. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4774 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2da2ccee |
|
20-Sep-2003 |
shatty <shatty@nowhere.fake> |
new posix compliant and public resource.h git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4771 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
173f54f1473bd6a6511c5fc6dc899c91fb8dd667 |
|
19-Jul-2012 |
Matt Madia <mattmadia@gmail.com> |
Updated copyright in headers. No functional change.
|
#
0fae873352b02792db93f721c1a2ff6b240c8ecc |
|
03-Nov-2010 |
Scott McCreary <scottmc2@gmail.com> |
Updated posix headers to remove commas from copyright line, to match the preferred coding guidelines. Cleaned up some header style violations, making sure there are two blank lines after the header guards. This fixes the posix header part of #2191. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39288 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cfcee452a416d0f4b933cb068237a12705d8ea1f |
|
22-Dec-2009 |
Colin Günther <coling@gmx.de> |
Whitespace cleanup, no functional change. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34748 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2222d0559df303a9846a2fad53741f8b20b14d7c |
|
24-Nov-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Introduced new header directory "config", which ATM contains HaikuConfig.h and types.h. The idea is to provide a basic architecture/compiler abstraction by defining types and macros that allow the posix/ and os/ headers to be mostly architecture/compiler agnostic. * Adjusted the posix/ and os/ headers accordingly. * <SupportDefs.h>: Introduced B_PRI* and B_SCN* macros similar to the PRI* and SCN* macros defined in <inttypes.h>, just for the BeOS/Haiku [u]int* types and some POSIX types (e.g. off_t, dev_t, ino_t) that don't have POSIX macros. Also the B_PRI* and B_SCN* macros are available unconditionally, unlike the <inttypes.h> macros, which require __STDC_FORMAT_MACROS to be defined in C++ mode. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34214 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
461106374f2e3bc83ea1380257ec5b1f8df65bbe |
|
10-Aug-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
* Fix year in license git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26922 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4093d16d51324e72436224347e1ffa80ef390951 |
|
10-Aug-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
* updating license * use _{BEGIN|END}_DECL macro instead of ifdef C++ git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26921 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b93201281504cee31f4186f7c6548815940c576e |
|
10-May-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Patch by Andreas Faerber: Replaced single-line comments by multi-line comments for ANSI C compliance. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25433 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c2be814ab537a9c0ccbfdf7fdae32b56e68a34fc |
|
22-May-2006 |
François Revol <revol@free.fr> |
added an Haiku-specific RLIMIT (NumOpenVnodeMONitors) (UNIMPLEMENTED yet) (we might want to renumber it), and used that one and NOFILE to implement R5 private calls _kset_[fd|mon]_limit_() git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17545 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1470102500456b3a3558ac2da4b196e65b681ea0 |
|
21-Sep-2003 |
Axel Dörfler <axeld@pinc-software.de> |
change variable name to better fit its purpose. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4775 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
051f88282443f623277a2bd46c305ad562ca335c |
|
21-Sep-2003 |
Axel Dörfler <axeld@pinc-software.de> |
Rewrote the resource.h header and added comments about missing functions and functionality. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4774 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2da2ccee097b1b1b2dad7d93c60ea1f1010bc587 |
|
20-Sep-2003 |
shatty <shatty@nowhere.fake> |
new posix compliant and public resource.h git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4771 a95241bf-73f2-0310-859d-f6bbb57e9c96
|