remove math.blas.syntax and merge parsing words into math.blas.vectors/matrices
[factor/jcg.git] / vm / os-linux.c
blob91017fc3f8e6c769ab6b882976a6cb222b6e4d6a
1 #include "master.h"
3 /* Snarfed from SBCL linux-so.c. You must free() this yourself. */
4 const char *vm_executable_path(void)
6 char *path = safe_malloc(PATH_MAX + 1);
8 int size = readlink("/proc/self/exe", path, PATH_MAX);
9 if (size < 0)
11 fatal_error("Cannot read /proc/self/exe",0);
12 return NULL;
14 else
16 path[size] = '\0';
17 return safe_strdup(path);
21 #ifdef SYS_inotify_init
23 int inotify_init(void)
25 return syscall(SYS_inotify_init);
28 int inotify_add_watch(int fd, const char *name, u32 mask)
30 return syscall(SYS_inotify_add_watch, fd, name, mask);
33 int inotify_rm_watch(int fd, u32 wd)
35 return syscall(SYS_inotify_rm_watch, fd, wd);
38 #else
40 int inotify_init(void)
42 not_implemented_error();
43 return -1;
46 int inotify_add_watch(int fd, const char *name, u32 mask)
48 not_implemented_error();
49 return -1;
52 int inotify_rm_watch(int fd, u32 wd)
54 not_implemented_error();
55 return -1;
58 #endif