// create a dir // mcSync returns: 0 if ok // < 0 if error // // args: port number // slot number // directory name // returns: 0 = successful // < 0 = error int mcMkDir(int port, int slot, const char* name) { int ret = mcOpen(port, slot, name, 0x40); if(ret != 0) g_currentCmd = MC_FUNC_MK_DIR; return ret; }
int McAccess::open(const char *name, int mode) { int res; WaitSema(_sema); mcOpen(_port, _slot, name, mode); mcSync(0, NULL, &res); SignalSema(_sema); return res; }
int mcIO::open(const char *name, int flags) { int rv; #ifdef AIOMC_DEBUG // printf("mcIO open\n"); #endif mcOpen(port, 0, name, flags); mcSync(MC_WAIT, NULL, &rv); return rv; }