Skip to content
Snippets Groups Projects
Commit d7bd3096 authored by deuce's avatar deuce
Browse files

Change rungbuf.h to ALWAYS include threadwrap.h...

NOTES:
------
startup.h has an ugly YIELD kludge in it, and includes both ringbuf.h and
threadwrap.h.  However, it is sometimes used in non-threaded utils.
This must be fixed!
parent e5415879
No related branches found
No related tags found
No related merge requests found
......@@ -42,9 +42,10 @@
#ifndef _RINGBUF_H_
#define _RINGBUF_H_
#ifdef RINGBUF_MUTEX
/* #ifdef RINGBUF_MUTEX */
/* Needed for YIELD() definition also are ringbuffers ever used in non-threaded bits? */
#include "threadwrap.h"
#endif
/* #endif */
#ifndef DWORD
#define DWORD unsigned long
......
......@@ -45,11 +45,9 @@
#include "client.h"
#include "ringbuf.h"
#include "threadwrap.h" /* sem_t */
#if defined(_PTH_PTHREAD_H_) && ! defined(SBBS) /* Ugly hack around the use of startup.h including threadwrap.h */
#if defined(SBBS) /* Ugly hack around the use of startup.h including threadwrap.h */
/* Leave the warning here as incentive to fix it correctly! */
#define SLEEP(x) ({ int y=x; struct timeval tv; \
tv.tv_sec=(y/1000); tv.tv_usec=((y%1000)*1000); \
select(0,NULL,NULL,NULL,&tv); })
#define YIELD()
#endif
typedef struct {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment