mirror of
https://github.com/PDP-10/klh10.git
synced 2026-01-13 15:27:10 +00:00
More HAVE_MLOCKALL.
This commit is contained in:
parent
e35327965a
commit
1a512d7628
@ -486,7 +486,7 @@ main(int argc, char **argv)
|
|||||||
** small, must respond quickly, and SU mode is more or less guaranteed.
|
** small, must respond quickly, and SU mode is more or less guaranteed.
|
||||||
** Skip it only if dp_main() already did it for us.
|
** Skip it only if dp_main() already did it for us.
|
||||||
*/
|
*/
|
||||||
#if CENV_SYS_DECOSF || CENV_SYS_SOLARIS || CENV_SYS_LINUX
|
#if HAVE_MLOCKALL
|
||||||
if (!(dpimp->dpimp_dpc.dpc_flags & DPCF_MEMLOCK)) {
|
if (!(dpimp->dpimp_dpc.dpc_flags & DPCF_MEMLOCK)) {
|
||||||
if (mlockall(MCL_CURRENT|MCL_FUTURE) != 0) {
|
if (mlockall(MCL_CURRENT|MCL_FUTURE) != 0) {
|
||||||
dbprintln("Warning - cannot lock memory");
|
dbprintln("Warning - cannot lock memory");
|
||||||
|
|||||||
@ -361,7 +361,7 @@ main(int argc, char **argv)
|
|||||||
** small, must respond quickly, and SU mode is more or less guaranteed.
|
** small, must respond quickly, and SU mode is more or less guaranteed.
|
||||||
** Skip it only if dp_main() already did it for us.
|
** Skip it only if dp_main() already did it for us.
|
||||||
*/
|
*/
|
||||||
#if CENV_SYS_DECOSF || CENV_SYS_SOLARIS || CENV_SYS_LINUX
|
#if HAVE_MLOCKALL
|
||||||
if (!(dpni->dpni_dpc.dpc_flags & DPCF_MEMLOCK)) {
|
if (!(dpni->dpni_dpc.dpc_flags & DPCF_MEMLOCK)) {
|
||||||
if (mlockall(MCL_CURRENT|MCL_FUTURE) != 0) {
|
if (mlockall(MCL_CURRENT|MCL_FUTURE) != 0) {
|
||||||
dbprintln("Warning - cannot lock memory");
|
dbprintln("Warning - cannot lock memory");
|
||||||
|
|||||||
@ -1679,7 +1679,7 @@ os_memlock(int dolock)
|
|||||||
** just return error if it fails for any reason.
|
** just return error if it fails for any reason.
|
||||||
*/
|
*/
|
||||||
if (dolock)
|
if (dolock)
|
||||||
return (mlockall(MCL_CURRENT+MCL_FUTURE) == 0);
|
return (mlockall(MCL_CURRENT|MCL_FUTURE) == 0);
|
||||||
else
|
else
|
||||||
return (munlockall() == 0);
|
return (munlockall() == 0);
|
||||||
#else
|
#else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user