28.08.2015 Views

The Design and Implementation of the Anykernel and Rump Kernels

1F3KDce

1F3KDce

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

120<br />

int<br />

rump_pub_lwproc_rfork(int arg1)<br />

{<br />

int rv;<br />

rump_schedule();<br />

rv = rump_lwproc_rfork(arg1);<br />

rump_unschedule();<br />

}<br />

return rv;<br />

Figure 3.15: Application interface implementation <strong>of</strong> lwproc rfork().<br />

<strong>The</strong> backend kernel call is wrapped around <strong>the</strong> rump kernel entrypoint <strong>and</strong> exitpoint.<br />

3.6.3 Interfaces Specific to <strong>Rump</strong> <strong>Kernels</strong><br />

Some interfaces are available only in rump kernels, for example <strong>the</strong> lwp/process<br />

context management interfaces (manual page rump lwproc.3 at A–23). In a similar<br />

fashion to o<strong>the</strong>r interface classes we have discussed, we supply autogenerated<br />

prototypes <strong>and</strong> wrappers.<br />

<strong>The</strong> application interface names are prefixed with rump_pub_ (shorth<strong>and</strong> for public).<br />

<strong>The</strong> respective internal interfaces are prefixed rump_. As an example, we present<br />

<strong>the</strong> wrapper for rump_pub_lwproc_rfork() in Figure 3.15. <strong>The</strong> public interface<br />

wraps <strong>the</strong> internal interface around <strong>the</strong> entrypoint <strong>and</strong> exitpoint.<br />

<strong>The</strong> master files for rump kernel interfaces are contained in <strong>the</strong> subdirectory <strong>of</strong> each<br />

faction in an .ifspec file. <strong>The</strong> script sys/rump/librump/makeifspec.sh analyzes<br />

this file <strong>and</strong> autogenerates <strong>the</strong> prototypes <strong>and</strong> wrappers.<br />

Additionally, <strong>the</strong>re exist bootstrap interfaces which can be called only before <strong>the</strong><br />

rump kernel is bootstrapped. An example is rump_boot_sethowto() which sets <strong>the</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!