DEADSOFTWARE

ported to osx-pcc
[flatwaifu.git] / src / memory.c
index 5c7953cc813ee93a99753ff327c2618352bd54da..af93fa6f7b00a2af6d1a9d5bacd6d0a028e3ee00 100644 (file)
@@ -90,3 +90,13 @@ void M_unlock(void *p) {
   if(!resl[h]) return;
   --resl[h];
 }
+
+int M_locked (int h) {
+  h&=-1-0x8000;
+  return (h != -1) && (h != 0xFFFF) && (resl[h] != 0);
+}
+
+int M_was_locked (int h) {
+  h&=-1-0x8000;
+  return (h != -1) && (h != 0xFFFF) && (resp[h] != NULL);
+}