From 339715b72a2aca4d817603928501f9629e385f26 Mon Sep 17 00:00:00 2001 From: Gerd Zellweger Date: Thu, 23 Feb 2012 00:18:40 +0100 Subject: [PATCH] Changes for nameservice. Use RPC client for NS functionality. --- hake/ArchDefaults.hs | 3 +- include/barrelfish/core_state.h | 4 +- include/barrelfish/domain.h | 6 +- lib/barrelfish/Hakefile | 4 +- lib/barrelfish/domain.c | 4 +- lib/barrelfish/init.c | 2 +- lib/barrelfish/nameservice_client.c | 124 ++++++++++++++++++--------- lib/dist2/client/read.c | 162 ----------------------------------- lib/dist2/parser/read.c | 162 +++++++++++++++++++++++++++++++++++ lib/posixcompat/Hakefile | 4 +- lib/posixcompat/semaphore.c | 12 ++-- 11 files changed, 264 insertions(+), 223 deletions(-) delete mode 100644 lib/dist2/client/read.c create mode 100644 lib/dist2/parser/read.c diff --git a/hake/ArchDefaults.hs b/hake/ArchDefaults.hs index 9d9ca8b..bf245cb 100644 --- a/hake/ArchDefaults.hs +++ b/hake/ArchDefaults.hs @@ -79,8 +79,7 @@ ldCxxFlags arch = stdLibs arch = [ In InstallTree arch "/lib/libbarrelfish.a", - In InstallTree arch "/lib/libdist2.a", - In InstallTree arch "/lib/libdist_parser.a", + In InstallTree arch "/lib/libdist_parser.a", -- dist_read() in nameservice_client.c In InstallTree arch "/errors/errno.o", In InstallTree arch "/lib/libc.a", In InstallTree arch "/lib/crtend.o" , diff --git a/include/barrelfish/core_state.h b/include/barrelfish/core_state.h index 58abc8b..52ae601 100644 --- a/include/barrelfish/core_state.h +++ b/include/barrelfish/core_state.h @@ -81,7 +81,7 @@ struct slot_alloc_state { }; struct terminal_state; -struct nameservice_rpc_client; +struct dist2_rpc_client; struct domain_state; struct spawn_state; struct monitor_binding; @@ -95,7 +95,7 @@ struct core_state_generic { struct mem_rpc_client *mem_st; struct morecore_state morecore_state; struct ram_alloc_state ram_alloc_state; - struct nameservice_rpc_client *nameservice_rpc_client; + struct dist2_rpc_client *nameservice_rpc_client; struct spawn_rpc_client *spawn_rpc_clients[MAX_CPUS]; struct terminal_state *terminal_state; struct domain_state *domain_state; diff --git a/include/barrelfish/domain.h b/include/barrelfish/domain.h index 1e47360..20772ea 100644 --- a/include/barrelfish/domain.h +++ b/include/barrelfish/domain.h @@ -18,7 +18,7 @@ typedef void (*domain_spanned_callback_t)(void *arg, errval_t err); struct mem_rpc_client; -struct nameservice_rpc_client; +struct dist2_rpc_client; struct monitor_binding; struct monitor_blocking_rpc_client; struct waitset; @@ -40,8 +40,8 @@ struct vspace *get_current_vspace(void); struct pmap *get_current_pmap(void); struct morecore_state *get_morecore_state(void); struct ram_alloc_state *get_ram_alloc_state(void); -void set_nameservice_rpc_client(struct nameservice_rpc_client *st); -struct nameservice_rpc_client *get_nameservice_rpc_client(void); +void set_nameservice_rpc_client(struct dist2_rpc_client *st); +struct dist2_rpc_client *get_nameservice_rpc_client(void); void set_spawn_rpc_client(coreid_t core, struct spawn_rpc_client *st); struct spawn_rpc_client *get_spawn_rpc_client(coreid_t core); struct terminal_state *get_terminal_state(void); diff --git a/lib/barrelfish/Hakefile b/lib/barrelfish/Hakefile index 6a717ab..3cae7cd 100644 --- a/lib/barrelfish/Hakefile +++ b/lib/barrelfish/Hakefile @@ -74,13 +74,13 @@ cFiles = arch_srcs arch ++ archfam_srcs (archFamily arch) ++ common_srcs ++ idc_srcs, assemblyFiles = arch_assembly (archFamily arch), - flounderBindings = [ "mem", "nameservice", "serial", + flounderBindings = [ "mem", "dist2", "serial", "interdisp", "spawn", "keyboard" ], -- only makes sense to compile monitor binding for lmp flounderExtraBindings = [ ("monitor", ["lmp"]), ("monitor_blocking", ["lmp", "rpcclient"]), ("mem", ["rpcclient"]), - ("nameservice", ["rpcclient"]), + ("dist2", ["rpcclient"]), ("spawn", ["rpcclient"]), ("serial", ["rpcclient"])], addIncludes = [ "include", "include" ./. arch_dir ], diff --git a/lib/barrelfish/domain.c b/lib/barrelfish/domain.c index b763347..a63c249 100644 --- a/lib/barrelfish/domain.c +++ b/lib/barrelfish/domain.c @@ -1088,7 +1088,7 @@ struct skb_state *get_skb_state(void) /** * \brief Returns a pointer to the chips_context state on the dispatcher priv */ -struct nameservice_rpc_client *get_nameservice_rpc_client(void) +struct dist2_rpc_client *get_nameservice_rpc_client(void) { dispatcher_handle_t handle = curdispatcher(); struct dispatcher_generic* disp = get_dispatcher_generic(handle); @@ -1098,7 +1098,7 @@ struct nameservice_rpc_client *get_nameservice_rpc_client(void) /** * \brief set the chips_context state on the dispatcher priv */ -void set_nameservice_rpc_client(struct nameservice_rpc_client *c) +void set_nameservice_rpc_client(struct dist2_rpc_client *c) { dispatcher_handle_t handle = curdispatcher(); struct dispatcher_generic* disp = get_dispatcher_generic(handle); diff --git a/lib/barrelfish/init.c b/lib/barrelfish/init.c index 509df59..54504e5 100644 --- a/lib/barrelfish/init.c +++ b/lib/barrelfish/init.c @@ -245,7 +245,7 @@ errval_t barrelfish_init_onthread(struct spawn_domain_params *params) #endif // try to connect to name service (may fail if we are the skb or ramfsd!) - err = dist_rpc_init(); + err = nameservice_client_blocking_bind(); if (err_is_fail(err)) { if (err_no(err) == LIB_ERR_GET_NAME_IREF) { // skip everything else if we don't have a nameservice diff --git a/lib/barrelfish/nameservice_client.c b/lib/barrelfish/nameservice_client.c index 408a28f..842a566 100644 --- a/lib/barrelfish/nameservice_client.c +++ b/lib/barrelfish/nameservice_client.c @@ -1,6 +1,6 @@ /** * \file - * \brief Client for interacting with the name service (chips) + * \brief Client for interacting with the name service */ /* @@ -11,13 +11,16 @@ * If you do not find this file, copies can be found by writing to: * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. */ +#include #include #include -#include -#include +#include +#include #include +#include // for dist_read TODO +#include // for NOP_TRIGGER /** * \brief Non-blocking name service lookup @@ -25,32 +28,43 @@ * \param iface Name of interface for which to query name server * \param retiref Returns pointer to IREF on success */ -#ifdef USE_CHIPS_NS errval_t nameservice_lookup(const char *iface, iref_t *retiref) { - nameservice_srvref_t ref; errval_t err; - struct nameservice_rpc_client *r = get_nameservice_rpc_client(); + struct dist2_rpc_client *r = get_nameservice_rpc_client(); if (r == NULL) { return LIB_ERR_NAMESERVICE_NOT_BOUND; } - err = r->vtbl.get_service_reference(r, iface, &ref); + char* record = NULL; + dist2_trigger_id_t tid; + errval_t error_code; + err = r->vtbl.get(r, iface, NOP_TRIGGER, &record, &tid, &error_code); if (err_is_fail(err)) { - return err_push(err, CHIPS_ERR_GET_SERVICE_REFERENCE); + goto out; } - - if (ref == 0) { - return CHIPS_ERR_UNKNOWN_NAME; + err = error_code; + if (err_is_fail(err)) { + if (err_no(err) == DIST2_ERR_NO_RECORD) { + err = err_push(err, LIB_ERR_NAMESERVICE_UNKNOWN_NAME); + } + goto out; } - err = r->vtbl.get_service(r, ref, retiref); - if (err_is_fail(err)) { - return err_push(err, CHIPS_ERR_GET_SERVICE_IREF); + uint64_t iref_number = 0; + err = dist_read(record, "_ { iref: %d }", &iref_number); + if (err_is_fail(err) || iref_number == 0) { + err = err_push(err, LIB_ERR_NAMESERVICE_INVALID_NAME); + goto out; + } + if (retiref != NULL) { + *retiref = iref_number; } - return SYS_ERR_OK; +out: + free(record); + return err; } /** @@ -61,34 +75,40 @@ errval_t nameservice_lookup(const char *iface, iref_t *retiref) */ errval_t nameservice_blocking_lookup(const char *iface, iref_t *retiref) { - nameservice_srvref_t ref; - iref_t iref; errval_t err; - struct nameservice_rpc_client *r = get_nameservice_rpc_client(); + struct dist2_rpc_client *r = get_nameservice_rpc_client(); if (r == NULL) { return LIB_ERR_NAMESERVICE_NOT_BOUND; } - err = r->vtbl.wait_for_service_reference(r, iface, &ref); + char* record = NULL; + errval_t error_code; + err = r->vtbl.wait_for(r, iface, &record, &error_code); if (err_is_fail(err)) { - return err_push(err, CHIPS_ERR_GET_SERVICE_REFERENCE); + goto out; } - - if (ref == 0) { - return CHIPS_ERR_GET_SERVICE_REFERENCE; + err = error_code; + if (err_is_fail(err)) { + if (err_no(err) == DIST2_ERR_NO_RECORD) { + err = err_push(err, LIB_ERR_NAMESERVICE_UNKNOWN_NAME); + } + goto out; } - err = r->vtbl.get_service(r, ref, &iref); + uint64_t iref_number = 0; + err = dist_read(record, "_ { iref: %d }", &iref_number); if (err_is_fail(err)) { - return err_push(err, CHIPS_ERR_GET_SERVICE_IREF); + err = err_push(err, LIB_ERR_NAMESERVICE_INVALID_NAME); + goto out; } - if (retiref != NULL) { - *retiref = iref; + *retiref = iref_number; } - return SYS_ERR_OK; +out: + free(record); + return err; } /** @@ -99,17 +119,37 @@ errval_t nameservice_blocking_lookup(const char *iface, iref_t *retiref) */ errval_t nameservice_register(const char *iface, iref_t iref) { - nameservice_srvref_t ref; + errval_t err = SYS_ERR_OK; - struct nameservice_rpc_client *r = get_nameservice_rpc_client(); + struct dist2_rpc_client *r = get_nameservice_rpc_client(); if (r == NULL) { return LIB_ERR_NAMESERVICE_NOT_BOUND; } - return r->vtbl.register_service(r, iref, iface, &ref); + // Format record + static const char* format = "%s { iref: %d }"; + size_t len = snprintf(NULL, 0, format, iface, iref); + char* record = malloc(len+1); + if (record == NULL) { + return LIB_ERR_MALLOC_FAIL; + } + snprintf(record, len+1, format, iface, iref); + + char* ret = NULL; + dist2_trigger_id_t tid; + errval_t error_code; + err = r->vtbl.set(r, record, 0, NOP_TRIGGER, 0, &ret, &tid, &error_code); + if (err_is_fail(err)) { + goto out; + } + err = error_code; + +out: + free(record); + return err; } -#endif +#ifdef NOT_YET_IMPLEMENTED /** * \brief Get a capability from the capability store. * @@ -120,7 +160,7 @@ errval_t nameservice_register(const char *iface, iref_t iref) errval_t nameservice_get_capability(const char *key, struct capref *retcap) { errval_t reterr; - struct nameservice_rpc_client *r = get_nameservice_rpc_client(); + struct dist2_rpc_client *r = get_nameservice_rpc_client(); if (r == NULL) { printf("nameservice not found\n"); return LIB_ERR_NAMESERVICE_NOT_BOUND; @@ -144,7 +184,7 @@ errval_t nameservice_get_capability(const char *key, struct capref *retcap) errval_t nameservice_put_capability(const char *key, struct capref cap) { errval_t reterr; - struct nameservice_rpc_client *r = get_nameservice_rpc_client(); + struct dist2_rpc_client *r = get_nameservice_rpc_client(); if (r == NULL) { return LIB_ERR_NAMESERVICE_NOT_BOUND; } @@ -156,11 +196,12 @@ errval_t nameservice_put_capability(const char *key, struct capref cap) return reterr; } +#endif /* ----------------------- BIND/INIT CODE FOLLOWS ----------------------- */ -static void error_handler(struct nameservice_binding *b, errval_t err) +static void error_handler(struct dist2_binding *b, errval_t err) { USER_PANIC_ERR(err, "asynchronous error in nameservice binding"); } @@ -171,17 +212,17 @@ struct bind_state { }; static void bind_continuation(void *st_arg, errval_t err, - struct nameservice_binding *b) + struct dist2_binding *b) { struct bind_state *st = st_arg; if (err_is_ok(err)) { b->error_handler = error_handler; - struct nameservice_rpc_client *r; - r = malloc(sizeof(struct nameservice_rpc_client)); + struct dist2_rpc_client *r; + r = malloc(sizeof(struct dist2_rpc_client)); assert(r != NULL); - err = nameservice_rpc_client_init(r, b); + err = dist2_rpc_client_init(r, b); if (err_is_fail(err)) { free(r); USER_PANIC_ERR(err, "error in nameservice_rpc_client_init"); @@ -203,8 +244,8 @@ static void get_name_iref_reply(struct monitor_binding *mb, iref_t iref, if (iref == 0) { err = LIB_ERR_GET_NAME_IREF; } else { - err = nameservice_bind(iref, bind_continuation, st, - get_default_waitset(), IDC_BIND_FLAG_RPC_CAP_TRANSFER); + err = dist2_bind(iref, bind_continuation, st, + get_default_waitset(), IDC_BIND_FLAG_RPC_CAP_TRANSFER); } if (err_is_fail(err)) { @@ -243,3 +284,4 @@ errval_t nameservice_client_blocking_bind(void) return st.err; } + diff --git a/lib/dist2/client/read.c b/lib/dist2/client/read.c deleted file mode 100644 index 4b9d240..0000000 --- a/lib/dist2/client/read.c +++ /dev/null @@ -1,162 +0,0 @@ -/** - * \file - * \brief Helper functions to read record contents. - */ - -/* - * Copyright (c) 2011, ETH Zurich. - * All rights reserved. - * - * This file is distributed under the terms in the attached LICENSE file. - * If you do not find this file, copies can be found by writing to: - * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. - */ - -#include -#include -#include - -#include - -#include -#include - -/** - * \brief Reads the content of a record string based on the provided format. - * Currently supported %d (int64_t*), %f (double*?), %s (char**). - * TODO: more detailed docs! - * - * \param record Record to read. - * \param format What you want to read. - * \param ... Values read are stored in the provided arguments. - * - * \retval SYS_ERR_OK - * \retval DIST2_ERR_ATTRIBUTE_NOT_FOUND - * \retval DIST2_ERR_TYPE_MISMATCH - * \retval DIST2_ERR_RECORD_NAME_MISMATCH - * \retval DIST2_ERR_ATTRIBUTE_MISMATCH - */ -errval_t dist_read(const char* record, const char* format, ...) -{ - errval_t err = SYS_ERR_OK; - va_list args; - va_start(args, format); - - char** s = NULL; - int64_t* i = NULL; - double* d = NULL; - - // Parse record and format strings - struct ast_object* ast = NULL; - struct ast_object* format_ast = NULL; - - err = generate_ast(record, &ast); - if(err_is_fail(err)) { - goto out; - } - err = generate_ast(format, &format_ast); - if(err_is_fail(err)) { - goto out; - } - - // Scan Name - struct ast_object* format_name = format_ast->u.on.name; - switch(format_name->type) { - case nodeType_Scan: - if(format_name->u.scn.c != 's') { - err = DIST2_ERR_INVALID_FORMAT; - goto out; - } - s = va_arg(args, char**); - *s = ast->u.on.name->u.in.str; - // Remove from AST so client has to free it - ast->u.on.name->u.in.str = NULL; - break; - - case nodeType_Variable: - // Just ignore record name - break; - - default: - err = DIST2_ERR_INVALID_FORMAT; - goto out; - break; - } - - // Scan Attributes - struct ast_object* attr = format_ast->u.on.attrs; - for(; attr != NULL; attr = attr->u.an.next) { - - struct ast_object* format_attr = attr->u.an.attr; - - // Enforced by Parser - assert(format_attr->type == nodeType_Pair); - assert(format_attr->u.pn.left->type == nodeType_Ident); - if(format_attr->u.pn.right->type != nodeType_Scan) { - err = DIST2_ERR_INVALID_FORMAT; - goto out; - } - - // Try to find attribute in record AST - struct ast_object* record_attr = ast_find_attribute(ast, - format_attr->u.pn.left->u.in.str); - if(record_attr == NULL) { - err = DIST2_ERR_UNKNOWN_ATTRIBUTE; - goto out; - } - struct ast_object* value = record_attr->u.pn.right; - - switch(format_attr->u.pn.right->u.scn.c) { - case 's': - s = va_arg(args, char**); - if(value->type == nodeType_Ident) { - *s = value->u.in.str; - value->u.in.str = NULL; - } - else if(value->type == nodeType_String) { - *s = value->u.sn.str; - value->u.sn.str = NULL; - } - else { - err = DIST2_ERR_INVALID_FORMAT; - goto out; - } - break; - - case 'd': - i = va_arg(args, int64_t*); - if(value->type == nodeType_Constant) { - *i = value->u.cn.value; - } - else { - *i = 0; - err = DIST2_ERR_INVALID_FORMAT; - goto out; - } - break; - - case 'f': - d = va_arg(args, double*); - if(value->type == nodeType_Float) { - *d = value->u.fn.value; - } - else { - *d = 0.0; - err = DIST2_ERR_INVALID_FORMAT; - goto out; - } - break; - - default: - err = DIST2_ERR_INVALID_FORMAT; - goto out; - break; - } - } - va_end(args); - - out: - free_ast(ast); - free_ast(format_ast); - return err; -} diff --git a/lib/dist2/parser/read.c b/lib/dist2/parser/read.c new file mode 100644 index 0000000..4b9d240 --- /dev/null +++ b/lib/dist2/parser/read.c @@ -0,0 +1,162 @@ +/** + * \file + * \brief Helper functions to read record contents. + */ + +/* + * Copyright (c) 2011, ETH Zurich. + * All rights reserved. + * + * This file is distributed under the terms in the attached LICENSE file. + * If you do not find this file, copies can be found by writing to: + * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. + */ + +#include +#include +#include + +#include + +#include +#include + +/** + * \brief Reads the content of a record string based on the provided format. + * Currently supported %d (int64_t*), %f (double*?), %s (char**). + * TODO: more detailed docs! + * + * \param record Record to read. + * \param format What you want to read. + * \param ... Values read are stored in the provided arguments. + * + * \retval SYS_ERR_OK + * \retval DIST2_ERR_ATTRIBUTE_NOT_FOUND + * \retval DIST2_ERR_TYPE_MISMATCH + * \retval DIST2_ERR_RECORD_NAME_MISMATCH + * \retval DIST2_ERR_ATTRIBUTE_MISMATCH + */ +errval_t dist_read(const char* record, const char* format, ...) +{ + errval_t err = SYS_ERR_OK; + va_list args; + va_start(args, format); + + char** s = NULL; + int64_t* i = NULL; + double* d = NULL; + + // Parse record and format strings + struct ast_object* ast = NULL; + struct ast_object* format_ast = NULL; + + err = generate_ast(record, &ast); + if(err_is_fail(err)) { + goto out; + } + err = generate_ast(format, &format_ast); + if(err_is_fail(err)) { + goto out; + } + + // Scan Name + struct ast_object* format_name = format_ast->u.on.name; + switch(format_name->type) { + case nodeType_Scan: + if(format_name->u.scn.c != 's') { + err = DIST2_ERR_INVALID_FORMAT; + goto out; + } + s = va_arg(args, char**); + *s = ast->u.on.name->u.in.str; + // Remove from AST so client has to free it + ast->u.on.name->u.in.str = NULL; + break; + + case nodeType_Variable: + // Just ignore record name + break; + + default: + err = DIST2_ERR_INVALID_FORMAT; + goto out; + break; + } + + // Scan Attributes + struct ast_object* attr = format_ast->u.on.attrs; + for(; attr != NULL; attr = attr->u.an.next) { + + struct ast_object* format_attr = attr->u.an.attr; + + // Enforced by Parser + assert(format_attr->type == nodeType_Pair); + assert(format_attr->u.pn.left->type == nodeType_Ident); + if(format_attr->u.pn.right->type != nodeType_Scan) { + err = DIST2_ERR_INVALID_FORMAT; + goto out; + } + + // Try to find attribute in record AST + struct ast_object* record_attr = ast_find_attribute(ast, + format_attr->u.pn.left->u.in.str); + if(record_attr == NULL) { + err = DIST2_ERR_UNKNOWN_ATTRIBUTE; + goto out; + } + struct ast_object* value = record_attr->u.pn.right; + + switch(format_attr->u.pn.right->u.scn.c) { + case 's': + s = va_arg(args, char**); + if(value->type == nodeType_Ident) { + *s = value->u.in.str; + value->u.in.str = NULL; + } + else if(value->type == nodeType_String) { + *s = value->u.sn.str; + value->u.sn.str = NULL; + } + else { + err = DIST2_ERR_INVALID_FORMAT; + goto out; + } + break; + + case 'd': + i = va_arg(args, int64_t*); + if(value->type == nodeType_Constant) { + *i = value->u.cn.value; + } + else { + *i = 0; + err = DIST2_ERR_INVALID_FORMAT; + goto out; + } + break; + + case 'f': + d = va_arg(args, double*); + if(value->type == nodeType_Float) { + *d = value->u.fn.value; + } + else { + *d = 0.0; + err = DIST2_ERR_INVALID_FORMAT; + goto out; + } + break; + + default: + err = DIST2_ERR_INVALID_FORMAT; + goto out; + break; + } + } + va_end(args); + + out: + free_ast(ast); + free_ast(format_ast); + return err; +} diff --git a/lib/posixcompat/Hakefile b/lib/posixcompat/Hakefile index 76a6d63..4a94c61 100644 --- a/lib/posixcompat/Hakefile +++ b/lib/posixcompat/Hakefile @@ -24,8 +24,8 @@ "shm.c", "getpid.c", "ioctl.c", "fcntl.c", "sockets.c", "select.c", "grp.c", "rename.c", "remove.c", "time.c", "random.c", "inheritance.c" ], - flounderDefs = [ "unixsock", "nameservice", "monitor" ], + flounderDefs = [ "unixsock", "dist2", "monitor" ], flounderBindings = [ "unixsock" ], - flounderExtraBindings = [ ("nameservice", ["rpcclient"]) ] + flounderExtraBindings = [ ("dist2", ["rpcclient"]) ] } ] diff --git a/lib/posixcompat/semaphore.c b/lib/posixcompat/semaphore.c index a940536..63b0f82 100644 --- a/lib/posixcompat/semaphore.c +++ b/lib/posixcompat/semaphore.c @@ -15,8 +15,8 @@ #include #include "posixcompat.h" -#include -#include +#include +#include int sem_init(sem_t *sem, int pshared, unsigned int value) { @@ -30,7 +30,7 @@ int sem_init(sem_t *sem, int pshared, unsigned int value) POSIXCOMPAT_DEBUG("%d: sem_init(%p, %d, %u)\n", disp_get_domain_id(), sem, pshared, value); - struct nameservice_rpc_client *r = get_nameservice_rpc_client(); + struct dist2_rpc_client *r = get_nameservice_rpc_client(); assert(r != NULL); errval_t err, reterr; @@ -67,7 +67,7 @@ int sem_wait(sem_t *sem) if(!sem->pshared) { thread_sem_wait(&sem->thread_sem); } else { - struct nameservice_rpc_client *r = get_nameservice_rpc_client(); + struct dist2_rpc_client *r = get_nameservice_rpc_client(); assert(r != NULL); errval_t err; @@ -92,7 +92,7 @@ int sem_trywait(sem_t *sem) return -1; } } else { - struct nameservice_rpc_client *r = get_nameservice_rpc_client(); + struct dist2_rpc_client *r = get_nameservice_rpc_client(); assert(r != NULL); errval_t err; @@ -126,7 +126,7 @@ int sem_post(sem_t *sem) if(!sem->pshared) { thread_sem_post(&sem->thread_sem); } else { - struct nameservice_rpc_client *r = get_nameservice_rpc_client(); + struct dist2_rpc_client *r = get_nameservice_rpc_client(); assert(r != NULL); errval_t err; -- 1.7.2.5