kernel22480%system.extension
fault.system

_SYSTEM_KERNEL_INVOCATION_H_included_
define

#define _SYSTEM_KERNEL_INVOCATION_H_included_

Invocation
structure

Invocationki_path
field
int *

Invocationki_argv
field
char **

Invocationki_environ
field
char **

Invocationki_spawnattr
field
int

Invocationki_spawnattr_init
field
char

Invocationki_options
field
char

Invocation()

POSIX_SYSCALL
macro

POSIX_SYSCALL()

RETRY_INIT20%
macro

RETRY_INIT()

RETRY70%
macro

RETRY()

CONFIG_SOCKET_TRANSFER_LIMIT10%
define

#define CONFIG_SOCKET_TRANSFER_LIMIT 1

kp_message
structure

kp_messageiovec
structure

kp_messageiov
field
struct iovec

kp_messagemsghdr
structure

kp_messagemh
field
struct msghdr

kp_messagebuf
field
char[CMSG_SPACE(sizeof(kport_t) * 1)]

kp_messagecmsghdr
structure

kp_message_align
field
struct cmsghdr

kp_messageab
field
union (unnamed union at /x/p/python/fault/system/extensions/kernel/posix.c:40:2)

_init_kp_message140%
function
struct cmsghdr *

_init_kp_message(m, buf, bufsize)

kp_chfd100%
function
int

kp_chfd(kp, op, delta)

kp_chfl100%
function
int

kp_chfl(kp, op, delta)

kp_receive230%
function
int

kp_receive(kp, buf, size)

kp_transmit220%
function
int

kp_transmit(kp, buf, size)

kp_accept240%
function
int

kp_accept(kp, buf, size)

Regular socket accept from listening sockets.

kp_alloc_meta170%
function
int

kp_alloc_meta(kp, buf, size)

Allocate kport_t pairs capable of transmitting and receiving other kernel ports.

kp_alloc_bidirectional170%
function
int

kp_alloc_bidirectional(kp, buf, size)

kp_alloc_unidirectional170%
function
int

kp_alloc_unidirectional(kp, buf, size)

_SYSTEM_KERNEL_EVENT_H_included_
define

#define _SYSTEM_KERNEL_EVENT_H_included_

EV_CYCLIC
define

#define EV_CYCLIC 1

EVENT_TYPE_META_LIST90%
macro

EVENT_TYPE_META_LIST()

EVENT_TYPE_TIME_LIST60%
macro

EVENT_TYPE_TIME_LIST()

EVENT_TYPE_IP_LIST60%
macro

EVENT_TYPE_IP_LIST()

EVENT_TYPE_FS_LIST90%
macro

EVENT_TYPE_FS_LIST()

EVENT_TYPE_IO_LIST90%
macro

EVENT_TYPE_IO_LIST()

EVENT_TYPE_LIST150%
macro

EVENT_TYPE_LIST()

EV_TYPE_ID20%
macro

EV_TYPE_ID()

EV_TYPE
define

#define EV_TYPE(NAME, C, CYCLIC) EV_TYPE_ID(NAME),
#define EV_TYPE(NAME, C, CYCLIC) \
	case EV_TYPE_ID(NAME): \
		return(#NAME); \
	break;
#define EV_TYPE(NAME, C, CYCLIC) \
	case EV_TYPE_ID(NAME): \
		*typname = #NAME; \
	break;
#define EV_TYPE(NAME, C, CYCLIC) \
	case EV_TYPE_ID(NAME): \
		return("evt_" #NAME); \
	break;
#define EV_TYPE(...) EV_CONSTRUCTORS(__VA_ARGS__)
#define EV_TYPE(NAME, C, CYCLIC) \
	case EV_TYPE_ID(NAME): \
		normal = #NAME; \
	break;
#define EV_TYPE(NAME, C, CYCLIC) PyMethod_Keywords(NAME),

_SHIFT
define

#define _SHIFT(B,O) (B << O)

STRSHIFT50%
define

#define STRSHIFT(a) \
	(_SHIFT(a[0],24)|_SHIFT(a[1],16)|_SHIFT(a[2],8)|_SHIFT(a[3],0))

STRCASE50%
define

#define STRCASE(a,b,c,d) \
	(_SHIFT(a,24)|_SHIFT(b,16)|_SHIFT(c,8)|_SHIFT(d,0))

Event_Specification
macro

Event_Specification()

Event_Type
macro

Event_Type()

Event_GetSource
macro

Event_GetSource()

Event_GetKPort
macro

Event_GetKPort()

Event_GetTime
macro

Event_GetTime()

Event_GetProcess
macro

Event_GetProcess()

Event_GetSignal
macro

Event_GetSignal()

Event_GetCorrelation
macro

Event_GetCorrelation()

Event_SetSource
macro

Event_SetSource()

Event_SetKPort
macro

Event_SetKPort()

Event_SetTime
macro

Event_SetTime()

Event_SetProcess
macro

Event_SetProcess()

Event_SetSignal
macro

Event_SetSignal()

Event_SetCorrelation
macro

Event_SetCorrelation()

EventType
enumeration

EventType()

evt_invalid
constant

evt_invalid()

ev_type_name70%
function
const char *

ev_type_name(etyp)

ev_type_code20%
function
enum EventType

ev_type_code(n)

EventSpecification
structure

EventSpecificationevs_type
field
enum EventType

EventSpecificationevs_source
field
int

EventSpecificationevs_kresource
field
int

EventSpecificationtime
field
int

EventSpecificationprocess
field
int

EventSpecificationsignal_code
field
int

EventSpecificationcorrelation
field
int

EventSpecificationevs_field
field
union (unnamed union at /x/p/python/fault/system/extensions/kernel/event.h:180:2)

EventSpecificationevs_terminal
field
int[0]

event_t
typedef
struct EventSpecification

event_t()

evs_type_name10%
function
int

evs_type_name(evs, typname)

evs_type_identifier10%
function
const char *

evs_type_identifier(evs)

Event
structure

Event()

Eventevent_t
field
int

LF
define

#define LF(FLAG) \
	STATIC(PyObj) \
	ln_get_##FLAG(Link ln, void *closure) \
	{ \
		if (Link_Get(ln, FLAG)) \
			Py_RETURN_TRUE; \
		Py_RETURN_FALSE; \
	}
#define LF(FLAG) \
	{#FLAG, (getter)ln_get_##FLAG, NULL, NULL},

ln_hash30%
function
Py_hash_t

ln_hash(ln)

ln_richcompare90%
function
PyObj

ln_richcompare(ln, operand, cmpop)

ln_call80%
function
PyObj

ln_call(ln, args, kw)

ln_clear70%
function
void

ln_clear(ln)

ln_traverse70%
function
int

ln_traverse(self, visit, arg)

ln_new90%
function
PyObj

ln_new(typ, args, kw)

ln_dealloc20%
function
void

ln_dealloc(ln)

_kports_alloc
macro

_kports_alloc()

PyMethod_Id
define

#define PyMethod_Id(N) kp_##N
#define PyMethod_Id(N) k_##N
#define PyMethod_Id(N) inv_##N
#define PyMethod_Id(N) ev_##N
#define PyMethod_Id(N) ks_##N

PyMethod_TypeControl
define

#define PyMethod_TypeControl PyMethod_ClassType
#define PyMethod_TypeControl PyMethod_ClassType

kports_alloc110%
function
KPorts

kports_alloc(fill, length)

kports_create90%
function
KPorts

kports_create(data, length)

kp_close80%
function
PyObj

kp_close(self)

kernel.Ports.close

kp_configure210%
function
PyObj

kp_configure(self)

kp_allocate130%
function
PyObj

kp_allocate(subtype, length)

kernel.Ports.allocate

kports_richcompare340%
function
PyObj

kports_richcompare(self, x, op)

kports_length20%
function
Py_ssize_t

kports_length(self)

kernel.Ports.__len__

kports_concat140%
function
PyObj

kports_concat(self, x)

kernel.Ports.__concat__

kports_repeat120%
function
PyObj

kports_repeat(self, quantity)

kernel.Ports.__repeat__

kports_getitem70%
function
PyObj

kports_getitem(self, index)

kernel.Ports.__getitem__

kports_setitem120%
function
int

kports_setitem(self, index, val)

kernel.Ports.__setitem__

kports_subscript340%
function
PyObj

kports_subscript(self, item)

kernel.Ports.__getitem__

kports_getbuffer30%
function
int

kports_getbuffer(self, view, flags)

kports_new570%
function
PyObj

kports_new(subtype, args, kw)

kernel.Ports.__new__

kports_dealloc20%
function
void

kports_dealloc(self)

EPOLL_FLAGS
define

#define EPOLL_FLAGS EPOLLRDHUP

AEV_CREATE
define

#define AEV_CREATE EPOLL_CTL_ADD
#define AEV_CREATE EV_ADD

AEV_DELETE
define

#define AEV_DELETE EPOLL_CTL_DEL
#define AEV_DELETE EV_DELETE

AEV_UPDATE
define

#define AEV_UPDATE EPOLL_CTL_MOD
#define AEV_UPDATE EV_ADD

AEV_CYCLIC
macro

AEV_CYCLIC()

AEV_CYCLIC()

AEV_CYCLIC_ENABLE
macro

AEV_CYCLIC_ENABLE()

AEV_CYCLIC_ENABLE()

AEV_CYCLIC_DISABLE
macro

AEV_CYCLIC_DISABLE()

AEV_CYCLIC_DISABLE()

KQ_FRAGMENT
define

#define KQ_FRAGMENT kport_t kq_root, kq_eventfd_interrupt;
#define KQ_FRAGMENT kport_t kq_root;

epoll_event
structure

kevent_t
typedef
struct epoll_event

kevent_t()

kevent_t()

INITIAL_TASK_COUNT
define

#define INITIAL_TASK_COUNT 4

MAX_TASKS_PER_SEGMENT10%
define

#define MAX_TASKS_PER_SEGMENT 128

TASKQ_MEMORY_ERROR10%
macro

TASKQ_MEMORY_ERROR()

TASKQ_PARALLEL_ERROR10%
macro

TASKQ_PARALLEL_ERROR()

TASKQ_FULL10%
macro

TASKQ_FULL()

TASKQ_ALLOCATION_SIZE10%
macro

TASKQ_ALLOCATION_SIZE()

TASKQ_MEMORY_ACQUIRE10%
define

#define TASKQ_MEMORY_ACQUIRE PyMem_Malloc

TASKQ_MEMORY_RELEASE10%
define

#define TASKQ_MEMORY_RELEASE PyMem_Free

TASKQ_ALLOCATE30%
macro

TASKQ_ALLOCATE()

taskq_extend120%
function
int

taskq_extend(tq)

Append a memory allocation to the task queue.

taskq_insert10%
function
int

taskq_insert(tq, callable)

Insert task at the end of the queue. Presume available space.

taskq_enqueue70%
function
int

taskq_enqueue(tq, callable)

High-level append.

trap_execution_error320%
function
void

trap_execution_error(errctl, errctx, task)

Handle error cases using errctl and PyErr_WriteUnraisable when it or other critical operations fail.

taskq_continue100%
function
int

taskq_continue(tq)

Pop segments from TaskQueue.q_executing.

taskq_cycle60%
function
int

taskq_cycle(tq)

taskq_execute220%
function
int

taskq_execute(tq, errctl, errctx)

Execute the tasks in the TaskQueue.q_executing, and rotate TaskQueue.q_loading for the next cycle.

taskq_clear250%
function
void

taskq_clear(tq)

Release all objects held by the queue.

taskq_traverse260%
function
int

taskq_traverse(tq, visit, arg)

Container traversal for GC support.

taskq_initialize140%
function
int

taskq_initialize(tq)

Initialize the given, already allocated, task queue.

_SYSTEM_KERNEL_SCHEDULER_H_included_
define

#define _SYSTEM_KERNEL_SCHEDULER_H_included_

Scheduler_GetTaskQueue10%
macro

Scheduler_GetTaskQueue()

Scheduler_GetKernelQueue10%
macro

Scheduler_GetKernelQueue()

Scheduler_GetExceptionTrap10%
macro

Scheduler_GetExceptionTrap()

Scheduler_SetExceptionTrap20%
macro

Scheduler_SetExceptionTrap()

Scheduler_UpdateExceptionTrap60%
macro

Scheduler_UpdateExceptionTrap()

Scheduler
structure

Scheduler()

SchedulerPyObj
field
int

Schedulerks_waiting
field
int

Schedulerks_exc
field
int

SchedulerTaskQueue
structure

Schedulerks_tq
field
struct TaskQueue

SchedulerKernelQueue
structure

Schedulerks_eq
field
struct KernelQueue

KPORT_TRANSFER150%
macro

KPORT_TRANSFER()

PortsType
define

#define PortsType KPortsType

PYTHON_TYPES
macro

PYTHON_TYPES()

k_preserve
define

#define k_preserve kport_clear_cloexec

k_released
define

#define k_released kport_set_cloexec

k_hostname
define

#define k_hostname get_hostname

k_machine_execution_context
define

#define k_machine_execution_context get_uname

k_machine
define

#define k_machine get_uname

k_clockticks
define

#define k_clockticks get_clock_ticks

k_set_process_title
define

#define k_set_process_title set_process_title

k_signalexit
define

#define k_signalexit signalexit

MODULE_FUNCTIONS
macro

MODULE_FUNCTIONS()

ID
define

#define ID(NAME) \
	if (PyType_Ready((PyTypeObject *) &( NAME##Type ))) \
		goto error; \
	Py_INCREF((PyObj) &( NAME##Type )); \
	if (PyModule_AddObject(module, #NAME, (PyObj) &( NAME##Type )) < 0) \
		{ Py_DECREF((PyObj) &( NAME##Type )); goto error; }

get_hostname
function
PyObj

get_hostname(mod)

get_uname80%
function
PyObj

get_uname(mod)

utsname10%
structure

get_clock_ticks20%
function
PyObj

get_clock_ticks(mod)

set_process_title20%
function
PyObj

set_process_title(mod, title)

inherit
structure

inheritprocess_id
field
int

prepare10%
function
void

prepare()

_after_fork_parent60%
function
int

_after_fork_parent(pc_param)

Execute the process._after_fork_parent object from a pending call.

parent80%
function
void

parent()

_after_fork_child60%
function
int

_after_fork_child(pc_param)

Execute the process._after_fork_child object from a pending call.

child70%
function
void

child()

Synchronize with the parent process.

ltracefunc10%
function
int

ltracefunc(ob, f, event, arg)

trace10%
function
PyObj

trace(self, args)

Set the trace object on a set of threads. Only supports callable-object level. This is intended for debuggers.

_exit_by_signal50%
function
void

_exit_by_signal()

Executed in atexit in order to preserve the signal's exit code.

signalexit100%
function
PyObj

signalexit(mod, ob)

Register low-level atexit handler for exiting via a signal.

kport_clear_cloexec220%
function
PyObj

kport_clear_cloexec(mod, seq)

Ensure that the kport is preserved across process images. Used by system to hold on to listening sockets.

Generally, most file descriptors created by system will have the FD_CLOEXEC flag set.

kport_set_cloexec220%
function
PyObj

kport_set_cloexec(mod, seq)

k_initialize120%
function
PyObj

k_initialize(mod, ctx)

_SYSTEM_KERNEL_KQUEUE_H_included_
define

#define _SYSTEM_KERNEL_KQUEUE_H_included_

AEV_TRANSMITS
macro

AEV_TRANSMITS()

AEV_KPORT
macro

AEV_KPORT()

NOTE_MSECONDS10%
define

#define NOTE_MSECONDS 0

EVFILT_SYSCOUNT
define

#define EVFILT_SYSCOUNT 32

EVFILT_EXCEPT
define

#define EVFILT_EXCEPT (-16 - EVFILT_SYSCOUNT)

KQ_EXCEPT_FILTERS
macro

KQ_EXCEPT_FILTERS()

EVFILT_PROCDESC
define

#define EVFILT_PROCDESC (-4 - EVFILT_SYSCOUNT)

KQ_PROCDESC_FILTERS
macro

KQ_PROCDESC_FILTERS()

KQ_USER_FILTERS
macro

KQ_USER_FILTERS()

EV_USER_SETUP
macro

EV_USER_SETUP()

EV_USER_TRIGGER
macro

EV_USER_TRIGGER()

EVFILT_VNODE
define

#define EVFILT_VNODE (-32 - EVFILT_SYSCOUNT)

KQ_FILESYSTEM_FILTERS
macro

KQ_FILESYSTEM_FILTERS()

EVFILT_MACHPORT
define

#define EVFILT_MACHPORT (-128 - EVFILT_SYSCOUNT)

KQ_MACHPORT_FILTERS
macro

KQ_MACHPORT_FILTERS()

KQ_FILTER_LIST
macro

KQ_FILTER_LIST()

EV_OOBAND
define

#define EV_OOBAND 0

KQ_FLAG_LIST
macro

KQ_FLAG_LIST()

KFILTER_ERROR40%
macro

KFILTER_ERROR()

NOTE_CLOSE_WRITE
define

#define NOTE_CLOSE_WRITE 0

NOTE_OPEN
define

#define NOTE_OPEN 0

NOTE_CLOSE
define

#define NOTE_CLOSE 0

KQ_VNODE_EVENT_LIST
macro

KQ_VNODE_EVENT_LIST()

EVENT_FS_VOID_FLAGS10%
define

#define EVENT_FS_VOID_FLAGS NOTE_RENAME|NOTE_DELETE|NOTE_REVOKE

EVENT_FS_DELTA_FLAGS10%
define

#define EVENT_FS_DELTA_FLAGS NOTE_WRITE|NOTE_EXTEND

EVENT_FS_STATUS_FLAGS30%
define

#define EVENT_FS_STATUS_FLAGS EVENT_FS_VOID_FLAGS | EVENT_FS_DELTA_FLAGS

kevent
structure

SIG
define

#define SIG(SID, CAT, SYM, ...) \
	case SIG##SID: return #CAT "/" #SYM; break;

signal_string
function
const char *

signal_string(sig)

kernelq_clear
function
void

kernelq_clear(kq)

kernelq_traverse50%
function
int

kernelq_traverse(kq, visit, arg)

kernelq_reference_update100%
function
int

kernelq_reference_update(kq, ln, current)

Replace the link in the reference dictionary, but return the existing object if any.

kernelq_reference_delete100%
function
int

kernelq_reference_delete(kq, ev)

kernelq_cyclic_event190%
function
int

kernelq_cyclic_event(kq, cyclic, ln, kev)

Set or clear the cyclic flag on ln or raise an error if it's not acceptable for the given filter.

kernelq_transition390%
function
int

kernelq_transition(kq, tq)

kernelq_cancel330%
function
PyObj

kernelq_cancel(kq, ev)

IOPTION_SET_PGROUP
define

#define IOPTION_SET_PGROUP 1

SPAWN_ATTRIBUTES
macro

SPAWN_ATTRIBUTES()

APPLE_SPAWN_EXTENSIONS
macro

APPLE_SPAWN_EXTENSIONS()

POSIX_SPAWN_ATTRIBUTES
macro

POSIX_SPAWN_ATTRIBUTES()

free_null_terminated_array60%
macro

free_null_terminated_array()

inv_spawn810%
function
PyObj

inv_spawn(self, args, kw)

inv_new1280%
function
PyObj

inv_new(subtype, args, kw)

inv_dealloc180%
function
void

inv_dealloc(self)

EV_CONSTRUCTORS140%
macro

EV_CONSTRUCTORS()

ev_time_units
function
int

ev_time_units(ev, args, kw)

Initialize an event for scheduling a timer.

ev_pid_reference140%
function
int

ev_pid_reference(ev, args, kw)

Initialize an event with a process identifier and optional port.

ev_signal_reference150%
function
int

ev_signal_reference(ev, args, kw)

Initialize an event with a signal code and optional port.

ev_reference80%
function
int

ev_reference(ev, args, kw)

Initialize an event with an arbitrary reference.

ev_filesystem_reference200%
function
int

ev_filesystem_reference(ev, args, kw)

Initialize an event with a filesystem Path. Monitoring events(fs_delta, fs_void, fs_status).

ev_io_reference90%
function
int

ev_io_reference(ev, args, kw)

Initialize an event with a pair of kport_t.

ev_constructor440%
function
PyObj

ev_constructor(typ, typstring)

ev_get_type40%
function
PyObj

ev_get_type(ev, closure)

ev_get_port40%
function
PyObj

ev_get_port(ev, closure)

ev_get_source60%
function
PyObj

ev_get_source(ev, closure)

ev_hash360%
function
Py_hash_t

ev_hash(ev)

ev_richcompare710%
function
PyObj

ev_richcompare(ev, operand, cmpop)

ev_new280%
function
PyObj

ev_new(typ, args, kw)

Copy Event. Type specific constructors must be used to create new instances.

ev_release180%
function
void

ev_release(ev)

ev_clear60%
function
void

ev_clear(ev)

ev_traverse60%
function
int

ev_traverse(self, visit, arg)

ev_dealloc30%
function
void

ev_dealloc(ev)

interrupt_wait90%
function
int

interrupt_wait(ks)

Interrupt a running kernel.Scheduler.wait call.

interrupt_waitReturns

0

Not Waiting; no interrupt issued.

1

Scheduler was waiting, but interrupt was already issued.

2

Interrupt issued to system.

timespec
structure

ks_enqueue150%
function
PyObj

ks_enqueue(ks, callable)

kernel.Scheduler.enqueue

ks_execute260%
function
PyObj

ks_execute(self)

kernel.Scheduler.execute

ks_termination250%
function
int

ks_termination(ks, kq, tq)

ks_close190%
function
PyObj

ks_close(self)

kernel.Scheduler.close

ks_void30%
function
PyObj

ks_void(self)

kernel.Scheduler.void

ks_interrupt120%
function
PyObj

ks_interrupt(self)

kernel.Scheduler.interrupt

ks_dispatch320%
function
PyObj

ks_dispatch(self, args, kw)

kernel.Scheduler.dispatch

ks_cancel250%
function
PyObj

ks_cancel(self, ref)

kernel.Scheduler.cancel

ks_operations20%
function
PyObj

ks_operations(self)

kernel.Scheduler.operations

ks__set_waiting20%
function
PyObj

ks__set_waiting(self)

ks_wait250%
function
PyObj

ks_wait(self, args)

kernel.Scheduler.wait

ks_get_closed60%
function
PyObj

ks_get_closed(self, closure)

ks_get_has_tasks60%
function
PyObj

ks_get_has_tasks(self, closure)

ks_traverse110%
function
int

ks_traverse(self, visit, arg)

ks_clear40%
function
int

ks_clear(self)

ks_dealloc50%
function
void

ks_dealloc(self)

kernel.Scheduler.__del__

ks_new250%
function
PyObj

ks_new(subtype, args, kw)

kernel.Scheduler.__new__

TQ_LQUEUE_HAS_TASKS30%
macro

TQ_LQUEUE_HAS_TASKS()

TQ_XQUEUE_HAS_TASKS
macro

TQ_XQUEUE_HAS_TASKS()

TQ_HAS_TASKS
macro

TQ_HAS_TASKS()

Tasks
structure

A linked list of vectors used to manage the queue's storage.

Tasks()

A linked list of vectors used to manage the queue's storage.

A linked list of vectors used to manage the queue's storage.

Taskst_next
field
Tasks

Taskst_allocated
field
int

Taskst_vector
field
int[0]

TaskQueue
structure

TaskQueue()

TaskQueueq_executing
field
struct Tasks *

TaskQueueq_loading
field
struct Tasks *

TaskQueueq_tail
field
struct Tasks *

TaskQueueq_tailcursor
field
int

LinkFlag20%
macro

LinkFlag()

LinkFlags
enumeration

LinkFlags()

The set of control flags used to identify the Link's state.

lnf_cancelled

Whether or not the operation has been disconnected from events. Resources associated with the event may still be open.

lnf_dispatched

Whether or not the operation has been scheduled with kernel.Scheduler.dispatch.

lnf_executing

Whether or not the operation's task is being executed right now. Primarily used as a safety to prevent unwanted recursion.

lnf_cyclic

Whether or not the task can be executed more than once.

lnf_void
constant

lnf_void()

lnf_cancelled
constant

lnf_cancelled()

lnf_dispatched
constant

lnf_dispatched()

lnf_executing
constant

lnf_executing()

lnf_cyclic
constant

lnf_cyclic()

CONFIG_STATIC_KEVENTS
define

#define CONFIG_STATIC_KEVENTS 16

CONFIG_SYSCALL_RETRY10%
define

#define CONFIG_SYSCALL_RETRY 16

__EV_KQUEUE__
macro

__EV_KQUEUE__()

__EV_KQUEUE__()

__EV_EPOLL__
macro

__EV_EPOLL__()

_SYSTEM_KERNEL_KERNELQ_H_included_
define

#define _SYSTEM_KERNEL_KERNELQ_H_included_

_RETRY_STATE10%
define

#define _RETRY_STATE _avail_retries

RETRY_STATE_INIT20%
define

#define RETRY_STATE_INIT int _RETRY_STATE = CONFIG_SYSCALL_RETRY

LIMITED_RETRY70%
macro

LIMITED_RETRY()

UNLIMITED_RETRY
macro

UNLIMITED_RETRY()

KernelQueue
structure

KernelQueue()

KernelQueuekq_references
field
int

KernelQueuekq_cancellations
field
int

KernelQueuekq_event_position
field
int

kport_t kq_root; // epoll and kqueue

KernelQueuekq_event_count
field
int

kport_t kq_root; // epoll and kqueue

KernelQueuekq_array
field
int

INITIAL_TASKS_ALLOCATED
define

#define INITIAL_TASKS_ALLOCATED 4

O_EVTONLY
define

#define O_EVTONLY O_RDONLY

KFILTER
define

#define KFILTER(B, TYP) case B: fname = #B; break;

FLAG
define

#define FLAG(FLG) "%s"
#define FLAG(FLG) (kev->flags & FLG) ? (#FLG "|") : "",

fs_event_open40%
function
kport_t

fs_event_open(path, ev_type)

ev_type is ignored here as the subevent set is determined by kernelq_identify.

kernelq_delta360%
function
int

kernelq_delta(kq, ctl, kp, event)

kernelq_identify720%
function
int

kernelq_identify(kev, evs)

Interpret event_t for use with a kqueue filter.

kernelq_interrupt40%
function
int

kernelq_interrupt(kq)

Called by kernel.Scheduler.interrupt.

kernelq_interrupt_accept10%
function
int

kernelq_interrupt_accept(kq)

Nothing to do for kqueue.

kernelq_interrupt_setup60%
function
int

kernelq_interrupt_setup(kq)

kevent_set_timer60%
function
void

kevent_set_timer(kev, ns)

kernelq_schedule440%
function
int

kernelq_schedule(kq, cyclic, ln)

Establish the link with the kernel event.

kernelq_default_flags50%
function
int

kernelq_default_flags(kq)

kernelq_initialize190%
function
int

kernelq_initialize(kq)

kernelq_close70%
function
int

kernelq_close(kq)

Close the event queue kernel resources.

kernelq_closeReturns

Zero if already closed, one if resources were destroyed. Negative one if errno was set.

kernelq_receive180%
function
int

kernelq_receive(kq, seconds, ns)

Receive events from the kernel. Retry logic is not desired here as the event loop will naturally try again.

pkevent10%
function
void

pkevent(kev)