~ubuntu-branches/ubuntu/lucid/9base/lucid

« back to all changes in this revision

Viewing changes to lib9/testfork.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2006-01-25 15:33:00 UTC
  • Revision ID: james.westby@ubuntu.com-20060125153300-6hh4p9wx8iqqply5
Tags: upstream-2
ImportĀ upstreamĀ versionĀ 2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <lib9.h>
 
2
 
 
3
void
 
4
sayhi(void *v)
 
5
{
 
6
        USED(v);
 
7
 
 
8
        print("hello from subproc\n");
 
9
        print("rendez got %lu from main\n", rendezvous(0x1234, 1234));
 
10
        exits(0);
 
11
}
 
12
 
 
13
int
 
14
main(int argc, char **argv)
 
15
{
 
16
        print("hello from main\n");
 
17
        ffork(RFMEM|RFPROC, sayhi, nil);
 
18
 
 
19
        print("rendez got %lu from subproc\n", rendezvous(0x1234, 0));
 
20
        exits(0);
 
21
}