Get current task */
| 112 | |
| 113 | /* Get current task */ |
| 114 | static 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 */ |
| 135 | void bsdsocklib_seterrno (TrapContext *ctx, SB, int sb_errno) |
no test coverage detected