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

Function gettask

src/bsdsocket.cpp:114–132  ·  view source on GitHub ↗

Get current task */

Source from the content-addressed store, hash-verified

112
113/* Get current task */
114static uae_u32 gettask (TrapContext *ctx)
115{
116 uae_u32 currtask, a1 = trap_get_areg(ctx, 1);
117 TCHAR *tskname;
118
119 trap_call_add_areg(ctx, 1, 0);
120 currtask = trap_call_lib(ctx, trap_get_long(ctx, 4), -0x126); /* FindTask */
121
122 trap_set_areg(ctx, 1, a1);
123
124 if (ISBSDTRACE) {
125 uae_char name[256];
126 trap_get_string(ctx, name, trap_get_long(ctx, currtask + 10), sizeof name);
127 tskname = au(name);
128 BSDTRACE ((_T("[%s] "), tskname));
129 xfree (tskname);
130 }
131 return currtask;
132}
133
134/* errno/herrno setting */
135void bsdsocklib_seterrno (TrapContext *ctx, SB, int sb_errno)

Callers 2

alloc_socketbaseFunction · 0.85
bsdsocklib_gethostidFunction · 0.85

Calls 7

trap_get_aregFunction · 0.85
trap_call_add_aregFunction · 0.85
trap_call_libFunction · 0.85
trap_get_longFunction · 0.85
trap_set_aregFunction · 0.85
trap_get_stringFunction · 0.85
auFunction · 0.85

Tested by

no test coverage detected