}
}
-static void *scsi_thread (void *wdv)
+static void scsi_thread (void *wdv)
{
struct wd_state *wds = (struct wd_state*)wdv;
struct wd_chip_state *wd = &wds->wc;
wd_execute_cmd(wds, cmd, msg, unit);
}
wds->scsi_thread_running = -1;
- return 0;
}
void init_wd_scsi (struct wd_state *wd)
}
/* cdrom data buffering thread */
-static void *akiko_thread (void *null)
+static void akiko_thread (void *null)
{
int secnum;
uae_u8 *tmp1;
sleep_millis (10);
}
akiko_thread_running = -1;
- return 0;
}
STATIC_INLINE uae_u8 akiko_get_long (uae_u32 v, int offset)
return 0;
}
-static void *cdda_unpack_func (void *v)
+static void cdda_unpack_func (void *v)
{
cdimage_unpack_thread = 1;
mp3decoder *mp3dec = NULL;
}
delete mp3dec;
cdimage_unpack_thread = -1;
- return 0;
}
static void audio_unpack (struct cdunit *cdu, struct cdtoc *t)
return restart;
}
-static void *cdda_play_func (void *v)
+static void cdda_play_func (void *v)
{
int outpos = -1;
struct cdunit *cdu = (struct cdunit*)v;
cdu->cdda_play = 1;
}
cdu->thread_active = false;
- return NULL;
}
static void cdda_stop (struct cdunit *cdu)
cd_finished = 1;
}
-static void *dev_thread (void *p)
+static void dev_thread (void *p)
{
write_log (_T("CDTV: CD thread started\n"));
thread_alive = 1;
uae_u32 b = read_comm_pipe_u32_blocking (&requests);
if (b == 0xffff) {
thread_alive = -1;
- return NULL;
+ return;
}
if (unitnum < 0)
continue;
ABFLAG_IO | ABFLAG_SAFE, S_READ, S_WRITE
};
-static void *dev_thread (void *p)
+static void dev_thread (void *p)
{
write_log (_T("CDTV-CR: CD thread started\n"));
thread_alive = 1;
uae_u32 b = read_comm_pipe_u32_blocking (&requests);
if (b == 0xffff) {
thread_alive = -1;
- return NULL;
+ return;
}
if (unitnum < 0)
continue;
add_filesys_config (p, -1, &ci);
}
-static void *console_thread (void *v)
+static void console_thread (void *v)
{
uae_set_thread_priority (NULL, 1);
for (;;) {
record_key_direct ((0x10 << 1) | 0);
record_key_direct ((0x10 << 1) | 1);
}
- return NULL;
}
int consolehook_activate (void)
*b = 255 - color_b;
}
-static void *prt_thread (void *p)
+static void prt_thread(void *p)
{
Bit16u x, y;
HDC TprinterDC = printerDC;
DeleteObject (TprinterDC);
DeleteObject (TmemHDC);
write_log (_T("EPSONPRINTER: background thread finished\n"));
- return 0;
}
static void outputPage(void)
}
#ifdef UAE_FILESYS_THREADS
-static void *filesys_thread (void *unit_v);
+static void filesys_thread (void *unit_v);
#endif
static void filesys_start_thread (UnitInfo *ui, int nr)
{
}
-static void *filesys_thread (void *unit_v)
+static void filesys_thread (void *unit_v)
{
UnitInfo *ui = (UnitInfo *)unit_v;
uae_set_thread_priority (NULL, 1);
for (;;) {
if (!filesys_iteration(ui)) {
- return 0;
+ return;
}
}
- return 0;
}
#endif
}
}
-static void *hardfile_thread (void *devs);
+static void hardfile_thread (void *devs);
static int start_thread (TrapContext *ctx, int unit)
{
struct hardfileprivdata *hfpd = &hardfpd[unit];
}
}
-static void *hardfile_thread (void *devs)
+static void hardfile_thread (void *devs)
{
struct hardfileprivdata *hfpd = (struct hardfileprivdata*)devs;
hfpd->thread_running = 0;
uae_sem_post (&hfpd->sync_sem);
uae_sem_post (&change_sem);
- return 0;
+ return;
} else if (hardfile_do_io(ctx, get_hardfile_data_controller(hfpd - &hardfpd[0]), hfpd, iobuf, request) == 0) {
put_byte_host(iobuf + 30, get_byte_host(iobuf + 30) & ~1);
trap_put_bytes(ctx, iobuf + 8, request + 8, 48 - 8);
}
}
-static void *ide_thread (void *idedata)
+static void ide_thread (void *idedata)
{
struct ide_thread_state *its = (struct ide_thread_state*)idedata;
for (;;) {
do_process_rw_command (ide);
}
its->state = -1;
- return 0;
}
void start_ide_thread(struct ide_thread_state *its)
cpu_thread_indirect_mode = 0xff;
}
-static void run_cpu_thread(void *(*f)(void *))
+static void run_cpu_thread(void (*f)(void *))
{
int framecnt = -1;
int vp = 0;
typedef void compiled_handler (void);
#ifdef WITH_THREADED_CPU
-static void *cpu_thread_run_jit(void *v)
+static void cpu_thread_run_jit(void *v)
{
cpu_thread_tid = uae_thread_get_id();
cpu_thread_active = 1;
}
#endif
cpu_thread_active = 0;
- return 0;
}
#endif
#endif
#ifdef WITH_THREADED_CPU
-static void *cpu_thread_run_2(void *v)
+static void cpu_thread_run_2(void *v)
{
bool exit = false;
struct regstruct *r = ®s;
} ENDTRY
}
cpu_thread_active = 0;
- return 0;
}
#endif
AVIOutput_End2(true);
}
-static void *AVIOutput_worker (void *arg);
+static void AVIOutput_worker (void *arg);
static void AVIOutput_Begin2(bool fullstart, bool immediate)
{
}
-static void *AVIOutput_worker (void *arg)
+static void AVIOutput_worker (void *arg)
{
bool quit = false;
write_log (_T("AVIOutput worker thread started\n"));
AVIOutput_AVIWriteAudio_Thread_End();
write_log (_T("AVIOutput worker thread killed. quit=%d\n"), quit);
alive = 0;
- return 0;
}
void AVIOutput_Toggle (int mode, bool immediate)
return restart;
}
-void *ciw_cdda_play(void *v)
+void ciw_cdda_play(void *v)
{
struct cda_play *ciw = (struct cda_play *)v;
int outpos = -1;
ciw->cdda_play = 1;
}
ciw->cdda_play = 0;
- return NULL;
}
void ciw_cdda_stop(struct cda_play *ciw)
cda_play_read_block read_block;
};
-void *ciw_cdda_play(void *ciw);
+void ciw_cdda_play(void *ciw);
void ciw_cdda_stop(struct cda_play *ciw);
int ciw_cdda_setstate(struct cda_play *ciw, int state, int playpos);
\ No newline at end of file
};
static struct d3d_initargs d3dargs;
-static void *D3D_init_start (void *p)
+static void D3D_init_start (void *p)
{
struct d3dstruct *d3d = &d3ddata[0];
struct timeval tv1, tv2;
write_log (_T("Threaded D3D_init() finished\n"));
d3d->frames_since_init = 0;
d3d->fakemode = false;
- return NULL;
}
static const TCHAR *xD3D_init (HWND ahwnd, int monid, int w_w, int w_h, int depth, int *freq, int mmulth, int mmultv)
}
}
-static void *driveclick_thread (void *v)
+static void driveclick_thread (void *v)
{
for (;;) {
int drive, cyl;
CmdSeek(h[drive], cyl);
}
}
- return NULL;
}
static int driveclick_fdrawcmd_init(int drive)
#define LOGITECH_LCD_DLL _T("SOFTWARE\\Classes\\CLSID\\{d0e790a5-01a7-49ae-ae0b-e986bdd0c21b}\\ServerBinary")
-static void *lcd_thread(void *null);
+static void lcd_thread(void *null);
void lcd_close (void)
{
lcd_updated = true;
}
-static void *lcd_thread(void *null)
+static void lcd_thread(void *null)
{
while (lcd_thread_active > 0) {
bool c;
}
}
lcd_thread_active = 0;
- return NULL;
}
int lcd_open (void)
return 1;
}
-static void *prt_thread (void *p)
+static void prt_thread (void *p)
{
uae_u8 **buffers = (uae_u8**)p;
int err, cnt, ok;
}
unload_ghostscript ();
prt_running--;
- return 0;
}
static int doflushprinter (void)
WaitCommEvent(sd->hCom, evtmask, &sd->olwce);
}
-static void *uaeser_trap_thread (void *arg)
+static void uaeser_trap_thread (void *arg)
{
struct uaeserialdatawin32 *sd = (struct uaeserialdatawin32*)arg;
HANDLE handles[4];
}
sd->threadactive = 0;
uae_sem_post (&sd->sync_sem);
- return 0;
}
void uaeser_trigger (void *vsd)
}
}
-static void *render_thread(void *v)
+static void render_thread(void *v)
{
render_thread_state = 1;
for (;;) {
}
}
render_thread_state = -1;
- return 0;
}
extern addrbank gfxmem_bank;
struct thparms
{
- void *(*f)(void*);
+ void (*f)(void *);
void *arg;
};
static unsigned __stdcall thread_init (void *f)
{
struct thparms *thp = (struct thparms*)f;
- void *(*fp)(void*) = thp->f;
+ void (*fp)(void *) = thp->f;
void *arg = thp->arg;
xfree (f);
#ifndef _CONSOLE
__try {
- fp (arg);
+ fp(arg);
#endif
#ifndef _CONSOLE
} __except (WIN32_ExceptionFilter (GetExceptionInformation (), GetExceptionCode ())) {
typedef BOOL(WINAPI* AVSETMMTHREADPRIORITY)(HANDLE, AVRT_PRIORITY);
static AVSETMMTHREADPRIORITY pAvSetMmThreadPriority;
-int uae_start_thread (const TCHAR *name, void *(*f)(void *), void *arg, uae_thread_id *tid)
+int uae_start_thread (const TCHAR *name, void (*f)(void *), void *arg, uae_thread_id *tid)
{
HANDLE hThread;
int result = 1;
return result;
}
-int uae_start_thread_fast (void *(*f)(void *), void *arg, uae_thread_id *tid)
+int uae_start_thread_fast (void (*f)(void *), void *arg, uae_thread_id *tid)
{
int v = uae_start_thread (NULL, f, arg, tid);
if (*tid) {
extern void uae_sem_post(uae_sem_t*);
extern void uae_sem_wait(uae_sem_t*t);
extern void uae_sem_init(uae_sem_t*, int manual_reset, int initial_state);
-extern int uae_start_thread(const TCHAR *name, void *(*f)(void *), void *arg, uae_thread_id *thread);
-extern int uae_start_thread_fast(void *(*f)(void *), void *arg, uae_thread_id *thread);
+extern int uae_start_thread(const TCHAR *name, void (*f)(void *), void *arg, uae_thread_id *thread);
+extern int uae_start_thread_fast(void (*f)(void *), void *arg, uae_thread_id *thread);
extern void uae_end_thread(uae_thread_id *thread);
extern void uae_set_thread_priority(uae_thread_id *, int);
extern uae_thread_id uae_thread_get_id(void);
}
#endif
-static void *uaenet_trap_threadr (void *arg)
+static void uaenet_trap_threadr (void *arg)
{
struct uaenetdatawin32 *sd = (struct uaenetdatawin32*)arg;
struct pcap_pkthdr *header;
}
sd->threadactiver = 0;
uae_sem_post (&sd->sync_semr);
- return 0;
}
-static void *uaenet_trap_threadw (void *arg)
+static void uaenet_trap_threadw (void *arg)
{
struct uaenetdatawin32 *sd = (struct uaenetdatawin32*)arg;
}
sd->threadactivew = 0;
uae_sem_post (&sd->sync_semw);
- return 0;
}
void uaenet_trigger (void *vsd)
ppc_state = PPC_STATE_ACTIVE;
}
-static void *ppc_thread(void *v)
+static void ppc_thread(void *v)
{
if (using_qemu()) {
write_log(_T("PPC: Warning - ppc_thread started with QEMU impl\n"));
write_log(_T("ppc_cpu_run() exited.\n"));
ppc_thread_running = false;
}
- return NULL;
}
void uae_ppc_execute_check(void)
return &pdevst[idx];
}
-static void *dev_thread (void *devs);
+static void dev_thread (void *devs);
static int start_thread (struct s2devstruct *dev)
{
if (dev->thread_running)
return err;
}
-static void *dev_thread (void *devs)
+static void dev_thread (void *devs)
{
struct s2devstruct *dev = (struct s2devstruct*)devs;
uae_sem_post (&dev->sync_sem);
uae_sem_post (&change_sem);
write_log (_T("%s: dev_thread killed\n"), getdevname ());
- return 0;
+ return;
}
struct priv_s2devstruct *pdev = getps2devstruct(ctx, iobuf, request);
asyncreq *ar = get_async_request (dev, request, 1);
trap_background_set_complete(ctx);
uae_sem_post (&change_sem);
}
- return 0;
}
static uae_u32 REGPARAM2 dev_init_2 (TrapContext *ctx)
}
}
-static void *dev_thread(void *devs);
+static void dev_thread(void *devs);
static int start_thread(struct devstruct *dev)
{
if (dev->thread_running)
}
}
-static void *dev_thread (void *devs)
+static void dev_thread (void *devs)
{
struct devstruct *dev = (struct devstruct*)devs;
dev->thread_running = 0;
uae_sem_post (&dev->sync_sem);
uae_sem_post (&change_sem);
- return 0;
+ return;
} else if (dev_do_io(ctx, dev, iobuf, request) == 0) {
put_byte_host(iobuf + 30, get_byte_host(iobuf + 30) & ~1);
trap_put_bytes(ctx, iobuf + 8, request + 8, 48 - 8);
trap_background_set_complete(ctx);
uae_sem_post (&change_sem);
}
- return 0;
}
static uae_u32 REGPARAM2 dev_init_2(TrapContext *ctx, int type)
static uae_thread_id slirp_tid;
extern uae_sem_t slirp_sem2;
-static void *slirp_receive_func(void *arg)
+static void slirp_receive_func(void *arg)
{
slirp_thread_active = 1;
while (slirp_thread_active) {
}
}
slirp_thread_active = -1;
- return 0;
}
int slirp_can_output(void)
/*
* Thread body for trap context
*/
-static void *trap_thread (void *arg)
+static void trap_thread (void *arg)
{
TrapContext *context = (TrapContext *) arg;
uae_sem_post (&context->switch_to_emu_sem);
/* Good bye, cruel world... */
-
- /* dummy return value */
- return 0;
}
xfree(ctx);
}
-static void *hardware_trap_thread(void *arg)
+static void hardware_trap_thread(void *arg)
{
int tid = (uae_u32)arg;
for (;;) {
}
}
hardware_trap_kill[tid] = -1;
- return 0;
}
void trap_background_set_complete(TrapContext *ctx)
}
}
-static void *uaenative_thread(void *arg)
+static void uaenative_thread(void *arg)
{
struct library_data *library_data = (struct library_data *) arg;
write_log (_T("uni: uaenative_thread exiting\n"));
free_library_data(library_data);
- return NULL;
}
uae_u32 uaenative_call_function (TrapContext *ctx, int flags)
return 0;
}
-static void *dev_thread (void *devs);
+static void dev_thread (void *devs);
static int start_thread (struct devstruct *dev)
{
init_comm_pipe (&dev->requests, 100, 1);
return err;
}
-static void *dev_thread (void *devs)
+static void dev_thread (void *devs)
{
struct devstruct *dev = (struct devstruct*)devs;
dev->thread_running = 0;
uae_sem_post (&dev->sync_sem);
uae_sem_post (&change_sem);
- return 0;
+ return;
} else if (get_async_request (dev, request, 1)) {
uae_ReplyMsg (request);
release_async_request (dev, request);
trap_background_set_complete(ctx);
uae_sem_post (&change_sem);
}
- return 0;
}
static uae_u32 REGPARAM2 dev_init (TrapContext *context)