1/*
2 * Copyright (c) 2007-2012, 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, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
8 */
9
10#include "elb.h"
11
12#include <barrelfish/net_constants.h>
13#include <if/net_queue_manager_defs.h>
14#include <barrelfish/bulk_transfer_arch.h>
15
16
17#include <contmng/contmng.h>
18
19void terminate_benchmark(void)
20{
21    net_if_terminate();
22    exit(-1);
23}
24
25static void process_cmdline(int argc, char* argv[])
26{
27    int i;
28    for (i = 1; i < argc; i++) {
29        benchmark_argument(argv[i]);
30    }
31}
32
33static void eventloop(void)
34{
35    struct waitset *ws = get_default_waitset();
36
37    while (1) {
38        event_dispatch_non_block(ws);
39        benchmark_do_pending_work();
40    }
41}
42
43int main(int argc, char* argv[])
44{
45    printf("elb_app: Started, v3\n");
46    process_cmdline(argc, argv);
47
48    benchmark_init();
49    eventloop();
50}
51
52