MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / getps2devstruct

Function getps2devstruct

src/sana2.cpp:253–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253static struct priv_s2devstruct *getps2devstruct(TrapContext *ctx, uae_u8 *iobuf, uaecptr request)
254{
255 int idx;
256
257 if (iobuf) {
258 idx = get_long_host(iobuf + 24);
259 } else {
260 idx = trap_get_long(ctx, request + 24);
261 }
262 if (idx < 0 || idx >= MAX_OPEN_DEVICES || pdevst[idx].inuse == 0) {
263 write_log (_T("%s: corrupt iorequest %08X %d\n"), SANA2NAME, request, idx);
264 return 0;
265 }
266 return &pdevst[idx];
267}
268
269static int dev_thread (void *devs);
270static int start_thread (struct s2devstruct *dev)

Callers 10

dev_close_2Function · 0.85
createwritepacketFunction · 0.85
uaenet_getdataFunction · 0.85
flushFunction · 0.85
dev_do_io_2Function · 0.85
dev_do_ioFunction · 0.85
dev_beginioFunction · 0.85
dev_threadFunction · 0.85
dev_abortioFunction · 0.85
uaenet_int_handler2Function · 0.85

Calls 3

get_long_hostFunction · 0.85
trap_get_longFunction · 0.85
write_logFunction · 0.70

Tested by

no test coverage detected