Removed unneeded thread function return parameter.

This commit is contained in:
Toni Wilen 2020-08-02 10:32:34 +03:00
parent aab0ad5aba
commit c14d5a8c29
29 changed files with 54 additions and 84 deletions

View File

@ -3869,7 +3869,7 @@ static void wd_execute_cmd(struct wd_state *wds, int cmd, int msg, int unit)
}
}
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;
@ -3883,7 +3883,6 @@ static void *scsi_thread (void *wdv)
wd_execute_cmd(wds, cmd, msg, unit);
}
wds->scsi_thread_running = -1;
return 0;
}
void init_wd_scsi (struct wd_state *wd)

View File

@ -1508,7 +1508,7 @@ static void AKIKO_hsync_handler (void)
}
/* cdrom data buffering thread */
static void *akiko_thread (void *null)
static void akiko_thread (void *null)
{
int secnum;
uae_u8 *tmp1;
@ -1629,7 +1629,6 @@ static void *akiko_thread (void *null)
sleep_millis (10);
}
akiko_thread_running = -1;
return 0;
}
STATIC_INLINE uae_u8 akiko_get_long (uae_u32 v, int offset)

View File

@ -391,7 +391,7 @@ static int setstate (struct cdunit *cdu, int state, int playpos)
return 0;
}
static void *cdda_unpack_func (void *v)
static void cdda_unpack_func (void *v)
{
cdimage_unpack_thread = 1;
mp3decoder *mp3dec = NULL;
@ -432,7 +432,6 @@ static void *cdda_unpack_func (void *v)
}
delete mp3dec;
cdimage_unpack_thread = -1;
return 0;
}
static void audio_unpack (struct cdunit *cdu, struct cdtoc *t)
@ -753,7 +752,7 @@ end:
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;
@ -773,7 +772,6 @@ static void *cdda_play_func (void *v)
cdu->cdda_play = 1;
}
cdu->thread_active = false;
return NULL;
}
static void cdda_stop (struct cdunit *cdu)

View File

@ -690,7 +690,7 @@ static void dma_do_thread (void)
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;
@ -699,7 +699,7 @@ static void *dev_thread (void *p)
uae_u32 b = read_comm_pipe_u32_blocking (&requests);
if (b == 0xffff) {
thread_alive = -1;
return NULL;
return;
}
if (unitnum < 0)
continue;

View File

@ -856,7 +856,7 @@ static addrbank cdtvcr_bank = {
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;
@ -865,7 +865,7 @@ static void *dev_thread (void *p)
uae_u32 b = read_comm_pipe_u32_blocking (&requests);
if (b == 0xffff) {
thread_alive = -1;
return NULL;
return;
}
if (unitnum < 0)
continue;

View File

@ -59,7 +59,7 @@ void consolehook_config (struct uae_prefs *p)
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 (;;) {
@ -72,7 +72,6 @@ static void *console_thread (void *v)
record_key_direct ((0x10 << 1) | 0);
record_key_direct ((0x10 << 1) | 1);
}
return NULL;
}
int consolehook_activate (void)

View File

@ -713,7 +713,7 @@ STATIC_INLINE void getcolor (uae_u8 *Tpage, uae_u8 *Tcpage, int x, int y, int Tp
*b = 255 - color_b;
}
static void *prt_thread (void *p)
static void prt_thread(void *p)
{
Bit16u x, y;
HDC TprinterDC = printerDC;
@ -885,7 +885,6 @@ end:
DeleteObject (TprinterDC);
DeleteObject (TmemHDC);
write_log (_T("EPSONPRINTER: background thread finished\n"));
return 0;
}
static void outputPage(void)

View File

@ -3225,7 +3225,7 @@ static bool mount_cd(UnitInfo *uinfo, int nr, struct mytimeval *ctime, uae_u64 *
}
#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)
{
@ -7139,17 +7139,16 @@ static int filesys_iteration(UnitInfo *ui)
}
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

View File

@ -2448,7 +2448,7 @@ static void abort_async (struct hardfileprivdata *hfpd, uaecptr request, int err
}
}
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];
@ -2997,7 +2997,7 @@ static uae_u32 REGPARAM2 hardfile_beginio (TrapContext *ctx)
}
}
static void *hardfile_thread (void *devs)
static void hardfile_thread (void *devs)
{
struct hardfileprivdata *hfpd = (struct hardfileprivdata*)devs;
@ -3013,7 +3013,7 @@ static void *hardfile_thread (void *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);

View File

@ -1553,7 +1553,7 @@ void ide_write_reg (struct ide_hdf *ide, int ide_reg, uae_u32 val)
}
}
static void *ide_thread (void *idedata)
static void ide_thread (void *idedata)
{
struct ide_thread_state *its = (struct ide_thread_state*)idedata;
for (;;) {
@ -1568,7 +1568,6 @@ static void *ide_thread (void *idedata)
do_process_rw_command (ide);
}
its->state = -1;
return 0;
}
void start_ide_thread(struct ide_thread_state *its)

View File

@ -5026,7 +5026,7 @@ void process_cpu_indirect_memory_write(uae_u32 addr, uae_u32 data, int size)
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;
@ -5285,7 +5285,7 @@ void execute_normal(void)
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;
@ -5314,7 +5314,6 @@ static void *cpu_thread_run_jit(void *v)
}
#endif
cpu_thread_active = 0;
return 0;
}
#endif
@ -6072,7 +6071,7 @@ cont:
#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 = &regs;
@ -6106,7 +6105,6 @@ static void *cpu_thread_run_2(void *v)
} ENDTRY
}
cpu_thread_active = 0;
return 0;
}
#endif

View File

@ -1385,7 +1385,7 @@ void AVIOutput_End(void)
AVIOutput_End2(true);
}
static void *AVIOutput_worker (void *arg);
static void AVIOutput_worker (void *arg);
static void AVIOutput_Begin2(bool fullstart, bool immediate)
{
@ -1636,7 +1636,7 @@ void AVIOutput_Initialize (void)
}
static void *AVIOutput_worker (void *arg)
static void AVIOutput_worker (void *arg)
{
bool quit = false;
write_log (_T("AVIOutput worker thread started\n"));
@ -1675,7 +1675,6 @@ static void *AVIOutput_worker (void *arg)
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)

View File

@ -589,7 +589,7 @@ end:
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;
@ -608,7 +608,6 @@ void *ciw_cdda_play(void *v)
ciw->cdda_play = 1;
}
ciw->cdda_play = 0;
return NULL;
}
void ciw_cdda_stop(struct cda_play *ciw)

View File

@ -68,6 +68,6 @@ struct cda_play
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);

View File

@ -3071,7 +3071,7 @@ struct d3d_initargs
};
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;
@ -3100,7 +3100,6 @@ static void *D3D_init_start (void *p)
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)

View File

@ -90,7 +90,7 @@ void driveclick_fdrawcmd_vsync(void)
}
}
static void *driveclick_thread (void *v)
static void driveclick_thread (void *v)
{
for (;;) {
int drive, cyl;
@ -109,7 +109,6 @@ static void *driveclick_thread (void *v)
CmdSeek(h[drive], cyl);
}
}
return NULL;
}
static int driveclick_fdrawcmd_init(int drive)

View File

@ -43,7 +43,7 @@ static LOGILCDSETBACKGROUND pLogiLcdMonoSetBackground, pLogiLcdColorSetBackgroun
#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)
{
@ -255,7 +255,7 @@ void lcd_update(int led, int on)
lcd_updated = true;
}
static void *lcd_thread(void *null)
static void lcd_thread(void *null)
{
while (lcd_thread_active > 0) {
bool c;
@ -272,7 +272,6 @@ static void *lcd_thread(void *null)
}
}
lcd_thread_active = 0;
return NULL;
}
int lcd_open (void)

View File

@ -181,7 +181,7 @@ static int openprinter_ps (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;
@ -223,7 +223,6 @@ static void *prt_thread (void *p)
}
unload_ghostscript ();
prt_running--;
return 0;
}
static int doflushprinter (void)
@ -668,7 +667,7 @@ static void startwce(struct uaeserialdatawin32 *sd, DWORD *evtmask)
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];
@ -710,7 +709,6 @@ static void *uaeser_trap_thread (void *arg)
}
sd->threadactive = 0;
uae_sem_post (&sd->sync_sem);
return 0;
}
void uaeser_trigger (void *vsd)

View File

@ -5340,7 +5340,7 @@ static void picasso_flushpixels(int index, uae_u8 *src, int off, bool render)
}
}
static void *render_thread(void *v)
static void render_thread(void *v)
{
render_thread_state = 1;
for (;;) {
@ -5361,7 +5361,6 @@ static void *render_thread(void *v)
}
}
render_thread_state = -1;
return 0;
}
extern addrbank gfxmem_bank;

View File

@ -149,21 +149,21 @@ typedef unsigned (__stdcall *BEGINTHREADEX_FUNCPTR)(void *);
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 ())) {
@ -183,7 +183,7 @@ void uae_end_thread (uae_thread_id *tid)
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;
@ -218,7 +218,7 @@ int uae_start_thread (const TCHAR *name, void *(*f)(void *), void *arg, uae_thre
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) {

View File

@ -7,8 +7,8 @@ extern int uae_sem_trywait_delay(uae_sem_t*, int);
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);

View File

@ -176,7 +176,7 @@ static void *uaenet_trap_thread (void *arg)
}
#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;
@ -200,10 +200,9 @@ static void *uaenet_trap_threadr (void *arg)
}
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;
@ -234,7 +233,6 @@ static void *uaenet_trap_threadw (void *arg)
}
sd->threadactivew = 0;
uae_sem_post (&sd->sync_semw);
return 0;
}
void uaenet_trigger (void *vsd)

View File

@ -607,7 +607,7 @@ static void uae_ppc_cpu_reset(void)
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"));
@ -620,7 +620,6 @@ static void *ppc_thread(void *v)
write_log(_T("ppc_cpu_run() exited.\n"));
ppc_thread_running = false;
}
return NULL;
}
void uae_ppc_execute_check(void)

View File

@ -270,7 +270,7 @@ static struct priv_s2devstruct *getps2devstruct(TrapContext *ctx, uae_u8 *iobuf,
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)
@ -1504,7 +1504,7 @@ err:
return err;
}
static void *dev_thread (void *devs)
static void dev_thread (void *devs)
{
struct s2devstruct *dev = (struct s2devstruct*)devs;
@ -1521,7 +1521,7 @@ static void *dev_thread (void *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);
@ -1544,7 +1544,6 @@ static void *dev_thread (void *devs)
trap_background_set_complete(ctx);
uae_sem_post (&change_sem);
}
return 0;
}
static uae_u32 REGPARAM2 dev_init_2 (TrapContext *ctx)

View File

@ -135,7 +135,7 @@ static const TCHAR *getdevname (int type)
}
}
static void *dev_thread(void *devs);
static void dev_thread(void *devs);
static int start_thread(struct devstruct *dev)
{
if (dev->thread_running)
@ -1102,7 +1102,7 @@ static uae_u32 REGPARAM2 dev_beginio(TrapContext *ctx)
}
}
static void *dev_thread (void *devs)
static void dev_thread (void *devs)
{
struct devstruct *dev = (struct devstruct*)devs;
@ -1118,7 +1118,7 @@ static void *dev_thread (void *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);
@ -1132,7 +1132,6 @@ static void *dev_thread (void *devs)
trap_background_set_complete(ctx);
uae_sem_post (&change_sem);
}
return 0;
}
static uae_u32 REGPARAM2 dev_init_2(TrapContext *ctx, int type)

View File

@ -137,7 +137,7 @@ static volatile int slirp_thread_active;
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) {
@ -175,7 +175,6 @@ static void *slirp_receive_func(void *arg)
}
}
slirp_thread_active = -1;
return 0;
}
int slirp_can_output(void)

View File

@ -264,7 +264,7 @@ static TrapContext *current_context;
/*
* Thread body for trap context
*/
static void *trap_thread (void *arg)
static void trap_thread (void *arg)
{
TrapContext *context = (TrapContext *) arg;
@ -301,9 +301,6 @@ static void *trap_thread (void *arg)
uae_sem_post (&context->switch_to_emu_sem);
/* Good bye, cruel world... */
/* dummy return value */
return 0;
}
@ -552,7 +549,7 @@ static void hardware_trap_ack(TrapContext *ctx)
xfree(ctx);
}
static void *hardware_trap_thread(void *arg)
static void hardware_trap_thread(void *arg)
{
int tid = (uae_u32)arg;
for (;;) {
@ -612,7 +609,6 @@ static void *hardware_trap_thread(void *arg)
}
}
hardware_trap_kill[tid] = -1;
return 0;
}
void trap_background_set_complete(TrapContext *ctx)

View File

@ -449,7 +449,7 @@ static void do_call_function (struct uni *uni)
}
}
static void *uaenative_thread(void *arg)
static void uaenative_thread(void *arg)
{
struct library_data *library_data = (struct library_data *) arg;
@ -468,7 +468,6 @@ static void *uaenative_thread(void *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)

View File

@ -158,7 +158,7 @@ static struct devstruct *getdevstruct (int uniq)
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);
@ -628,7 +628,7 @@ end:
return err;
}
static void *dev_thread (void *devs)
static void dev_thread (void *devs)
{
struct devstruct *dev = (struct devstruct*)devs;
@ -644,7 +644,7 @@ static void *dev_thread (void *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);
@ -657,7 +657,6 @@ static void *dev_thread (void *devs)
trap_background_set_complete(ctx);
uae_sem_post (&change_sem);
}
return 0;
}
static uae_u32 REGPARAM2 dev_init (TrapContext *context)