1/* 2 * Copyright (c) 2014 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, Universitaetsstrasse 6, CH-8092 Zurich. Attn: Systems Group. 8 */ 9 10#ifndef LIB_XOMP_WORKER_H_ 11#define LIB_XOMP_WORKER_H_ 12 13/// flag indicating that the worker is acting as a gatway 14#define XOMP_WID_GATEWAY_FLAG (1UL << 63) 15 16/** 17 * \brief parses the command line arguments to extract 18 * 19 * \param argc argument count 20 * \param argv argument values 21 * \param wid returns the XOMP worker ID 22 * 23 * \returns SYS_ERR_OK iff the command line arguments were parsed succecssfully 24 * XOMP_ERR_INVALID_WORKER_ARGS if there were no XOMP worker argumetnts 25 * errval on error 26 * 27 */ 28errval_t xomp_worker_parse_cmdline(uint8_t argc, 29 char *argv[], 30 xomp_wid_t *wid); 31 32/** 33 * \brief initializes the XOMP worker library 34 * 35 * \param wid Xomp worker id 36 * 37 * \returns SYS_ERR_OK on success 38 * errval on failure 39 */ 40errval_t xomp_worker_init(xomp_wid_t wid); 41 42#endif // LIB_XOMP_WORKER_H_ 43