1/*
2 * Copyright (c) 2007-12 ETH Zurich.
3 * All rights reserved.
4 *
5 * This file is distributed under the terms in the attached LICENSE file.
6 * If you do not find this file, copies can be found by writing to:
7 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group.
8 */
9#include <stdio.h>
10#include <string.h>
11#include <stdlib.h>
12
13#include <barrelfish/barrelfish.h>
14#include <barrelfish/ump_chan.h>
15#include <bench/bench.h>
16#include <barrelfish/sys_debug.h>
17
18#include <xeon_phi/xeon_phi.h>
19#include <xeon_phi/xeon_phi_client.h>
20
21
22int main(int argc,
23         char **argv)
24{
25    errval_t err;
26
27    debug_printf("Inter Card Transfer Test started.\n");
28
29    coreid_t core = 2;
30    char *name = "k1om/sbin/xeon_phi_inter";
31
32    xphi_dom_id_t domid0;
33
34    err = xeon_phi_client_spawn(0, core, name, NULL, NULL_CAP, 0, &domid0);
35    if (err_is_fail(err)) {
36        USER_PANIC_ERR(err, "could not send the spawn message");
37    }
38
39    xphi_dom_id_t domid1;
40    err = xeon_phi_client_spawn(1, core, name, NULL, NULL_CAP, 0, &domid1);
41    if (err_is_fail(err)) {
42        USER_PANIC_ERR(err, "could not send the spawn message");
43    }
44
45    debug_printf("Inter Card Transfer Test: Main Loop\n");
46
47    messages_handler_loop();
48
49    debug_printf("Terminated.\n");
50
51}
52
53