From 0b262e9496387d5e8adc0c5f6020b3f3300e8f79 Mon Sep 17 00:00:00 2001 From: ehmry Date: Mon, 31 Oct 2022 13:24:57 -0500 Subject: Genode: add scheduleCallbacks to asyncdispatch (#20708) * Genode: add native signal handler * Genode: add scheduleCallbacks to asyncdispatch This resolves some awkwardness where an RPC server may or may not use callSoon while dispatching RPC but without scheduling timers or I/O. --- lib/genode/constructibles.nim | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lib/genode/constructibles.nim (limited to 'lib/genode/constructibles.nim') diff --git a/lib/genode/constructibles.nim b/lib/genode/constructibles.nim new file mode 100644 index 000000000..3a4a646e0 --- /dev/null +++ b/lib/genode/constructibles.nim @@ -0,0 +1,21 @@ +# +# +# Nim's Runtime Library +# (c) Copyright 2022 Emery Hemingway +# +# See the file "copying.txt", included in this +# distribution, for details about the copyright. +# + +type Constructible*[T] {. + importcpp: "Genode::Constructible", + header: "", byref, pure.} = object + +proc construct*[T](x: Constructible[T]) {.importcpp.} + ## Construct a constructible C++ object. + +proc destruct*[T](x: Constructible[T]) {.importcpp.} + ## Destruct a constructible C++ object. + +proc constructed*[T](x: Constructible[T]): bool {.importcpp.} + ## Test if an object is constructed. -- cgit 1.4.1-2-gfad0