ENABLE_ITTI macro removal, modified telnet server to support all executables, modified record player to finalize switch to run-time option and allow usage with any device

This commit is contained in:
frtabu
2020-02-12 19:05:44 +01:00
parent 2520a92211
commit 6014ca42ac
67 changed files with 1408 additions and 3614 deletions
+8 -10
View File
@@ -15,7 +15,7 @@
#include "T_messages.txt.h"
#include "T_defs.h"
#include "T_IDs.h"
#include "softmodem-common.h"
static T_cache_t *T_local_cache;
static int T_busylist_head;
@@ -357,24 +357,22 @@ static void forward(void *_forwarder, char *buf, int size) {
if (f->tail != NULL) f->tail->next = new;
f->tail = new;
#if BASIC_SIMULATOR
if( IS_SOFTMODEM_BASICSIM){
/* When runnng the basic simulator, the tracer may be too slow.
* Let's not take too much memory in the tracee and
* wait if there is too much data to send. 200MB is
* arbitrary.
*/
while (f->memusage > 200 * 1024 * 1024) {
if (pthread_cond_signal(&f->cond)) abort();
while (f->memusage > 200 * 1024 * 1024) {
if (pthread_cond_signal(&f->cond)) abort();
if (pthread_mutex_unlock(&f->lock)) abort();
if (pthread_mutex_unlock(&f->lock)) abort();
usleep(1000);
usleep(1000);
if (pthread_mutex_lock(&f->lock)) abort();
if (pthread_mutex_lock(&f->lock)) abort();
}
}
#endif /* BASIC_SIMULATOR */
f->memusage += size+4;
/* warn every 100MB */