summaryrefslogtreecommitdiff
path: root/mlockunit.pas
diff options
context:
space:
mode:
Diffstat (limited to 'mlockunit.pas')
-rw-r--r--mlockunit.pas18
1 files changed, 18 insertions, 0 deletions
diff --git a/mlockunit.pas b/mlockunit.pas
new file mode 100644
index 0000000..16598d6
--- /dev/null
+++ b/mlockunit.pas
@@ -0,0 +1,18 @@
+unit mlockunit;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses ctypes;
+
+const _SC_PAGESIZE = 30;
+
+function mlock(const addr: pointer; len: cint): cint; external 'libc';
+function munlock(const addr: pointer; len: cint): cint; external 'libc';
+function sysconf(name: cint): clong; external 'libc';
+
+implementation
+
+end.
+