Module: Syscalls

Defined in:
lib/syscalls.rb,
lib/syscalls/version.rb

Overview

System call constants (e.g. SYS_open).

The constant names and values in this module are system-dependent. They are read in from sys/syscall.h when this gem is built.

The SYS_NUMBER and SYS_NAME hashes provide an easy way of converting from names to numbers.

A Syscalls.syscall method is also provided; it is identical to Kernel.syscall in 1.9.2-p290, except that it doesn’t give a warning that it will one day be removed.

Constant Summary collapse

SYS_NUMBER =

Hash from system call names (as symbols) to system call numbers.

Hash[self.constants.grep(/SYS_/).map{|c|
[c.to_sym, self.const_get(c)]
SYS_NAME =

Hash from system call numbers to system call names (as symbols).

SYS_NUMBER.invert
VERSION_MAJOR =
1
VERSION_MINOR =
0
VERSION_PATCH =
0
VERSION =
[VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH].join('.')