Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


XEND instruction now correctly generates GPF when not in RTM mode
[palacios.git] / gears / services / mpi / mpi_hc.c
1 #include "hcall.h"
2 #include "mpi_hc.h"
3
4 int mpi_init_hcall(int *argc, char ***argv)
5 {
6   long long rc;
7   long long zero=0;
8   long long cmd=MPI_INIT;
9
10   HCALL(rc,cmd,argc,argv,zero,zero,zero,zero,zero,zero);
11   
12   return rc;
13 }
14
15 int mpi_deinit_hcall()
16 {
17   long long rc;
18   long long zero=0;
19   long long cmd=MPI_DEINIT;
20
21   HCALL(rc,cmd,zero,zero,zero,zero,zero,zero,zero,zero);
22   
23   return rc;
24 }
25
26 int mpi_comm_rank_hcall(void *comm, int *rank)
27 {
28   long long rc;
29   long long zero=0;
30   long long cmd=MPI_RANK;
31   
32   HCALL(rc,cmd,comm,rank,zero,zero,zero,zero,zero,zero);
33   
34   return rc;
35 }
36
37 int mpi_send_hcall(void *buf, int n, void* dtype, int dest, int tag, void *comm)
38 {
39   long long rc;
40   long long zero=0;
41   long long cmd=MPI_SEND;
42
43   HCALL(rc,cmd,buf,n,dtype,dest,tag,comm,zero,zero);
44
45   return rc;
46 }
47
48 int mpi_recv_hcall(void *buf, int n, void *dtype, int src, int tag, 
49                    void * comm, void *stat) 
50 {
51   long long rc;
52   long long zero=0;
53   long long cmd=MPI_RECV;
54   
55   HCALL(rc,cmd,buf,n,dtype,src,tag,comm,stat,zero);
56
57   return rc;
58 }
59