Object findLocationOf(State *state, Object obj) { int args[6], findOpByName(ConcreteType, char *); ConcreteType bcct = BuiltinInstCT(BITCHUNKI); Bitchunk bc; ConcreteType ct; OID oid; static int lookupfn = 0; bc = (Bitchunk)CreateVector(bcct, sizeof(OID)); oid = OIDOf(obj); memmove(bc->d.data, &oid, sizeof(OID)); args[0] = (int)JNIL; args[1] = (int)JNIL; args[2] = (int)bc; args[3] = (int)bcct; args[4] = (int)OIDFetch(thisnode->node); args[5] = (int)BuiltinInstCT(NODEI); ct = CODEPTR(locsrv->flags); if (!lookupfn) lookupfn = findOpByName(ct, "lookup"); upcall(locsrv, lookupfn, 0, 2, 1, args); return (Object)args[0]; }
/***************************************************************************//** * @brief * Function that calls registered upcall ******************************************************************************/ void TOUCH_CallUpcall(void) { if (upcall) upcall((TOUCH_Pos_TypeDef*) ¤t_pos); }