|
L4Env::Dice - Access L4 primitives with L4Env and Dice compiler. |
L4Env::Dice - Access L4 primitives with L4Env and Dice compiler.
# in your subclass:
package MyCompiler::Foo;
use base 'L4Env::Dice';
write code here ...
1;
# in your packages:
package MyBicycle::Wheels;
use MyCompiler::Foo;
# for gnu hooks...
use MyCompiler::Dice ':gnu';
# POSIX
use MyCompiler::Dice ':posix';
# get the compiler
my $compiler = MyCompiler::Dice->compiler;
# generate hello_woerl.h
my $woerl = $compiler->generate_dice( ... );
# output to string
$woerl->as_string;
# generate include/config.h,
# this file should care about compiling
# with dice...
$woerl->gen_config_h;
This module gives the ability to compile packages which understands L4 primitives.
The basic idea consist of importing L4Env symbols inside our namespace.
the h2xs manpage is a tool designed to produce XS code from C headers files. For instance, h2xs make it easy to generate XS stub files, and then by running xsubpp with make to produces binaries at compilation time.
Configurable elements are defined in the file include/template_config.h.
You can get the following packages from Drops CVS.
Several more specialized interfaces are made available to the end-user.
Very basic support is included inside this module. For subclassing,
do use base 'L4Env::Dice'.
Write hooks for Fabrica, Hurd/L4.
See WRITING YOUR OWN HELLO WORLD MODULE below.
The Lites single-server is the work of Johannes Helander, and thus served has his master-thesis proposal.
Several years later, Michael Helmuth and XXX from Tu-Dresden University conducted experimentations on running Lites on L3.
The idea here is that we want to separate code from the CMU Mach base to the new POSIX Pthread librairy.
Writing your own L4 hello world client/server should be relatively easy to achieve by using this module as-is. It can sound something similar to:
package foo;
use base 'L4Env::Dice';
... write code ...
1;
perl -MO=C, [options] -o $(INTERFACE) foo.pl
Then run dice over the binary for compiling L4 stubs:
$(DICE) [options] $(INTERFACE) ...
In your grub /boot/config:
...
module=/my/perl/interface
Boot as usual...
A more detailed example. Enable (purists: import) C-strict aliasing with the ':ansi' switch.
use Package::Client ':ansi';
use POSIX;
# you write or import 'new'
my $hello = Package::Client->new( ... );
1;
Fiasco, Pistachio, L4-Linux, DDE (L4Env) and GNU Hurd/L4.
There's actually lot others which you can find only by trusting Googlee...
perl(1).
Plenty of courses :-)
Documentation falls in the category were it is almost completly out-of-date..
- SYNOPSIS is fat.
Etienne Robillard, <granted14 (at) yahoo (dot) com>
Copyright (C) 2004 by Etienne Robillard.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.
|
L4Env::Dice - Access L4 primitives with L4Env and Dice compiler. |