~ehmry/nim_genode

3f4ee062a8687d325da792426b6b082d6033195d — Emery Hemingway 2 years ago db72973
signals: expose signal submission
2 files changed, 6 insertions(+), 2 deletions(-)

M genode.nimble
M src/genode/signals.nim
M genode.nimble => genode.nimble +1 -1
@@ 1,6 1,6 @@
# Package

version       = "20.11.1"
version = "20221020"
author        = "Emery Hemingway"
description   = "System libraries for the Genode Operating System Framework"
license       = "AGPLv3"

M src/genode/signals.nim => src/genode/signals.nim +5 -1
@@ 10,7 10,7 @@ when not defined(genode) or defined(nimdoc):

import ../genode

from strutils import rsplit
from std/strutils import rsplit
const signalsPath = currentSourcePath.rsplit("/", 1)[0]
{.passC: "-I" & signalsPath.}



@@ 60,6 60,10 @@ proc cap*(sig: SignalHandler): SignalContextCapability =
  assert(not sig.cb.isNil)
  sig.cpp.cap

proc submit*(cap: SignalContextCapability) {.importcpp:
    "Genode::Signal_transmitter(#).submit()".}
  ## Submit a signal to a context by capability.

proc nimHandleSignal(p: pointer) {.exportc.} =
  ## C symbol invoked by entrypoint during signal dispatch.
  let dispatch = cast[SignalDispatcher](p)