rust/src/rt/rust_srv.h
Brian Anderson 4ef1ec580a Do all runtime calls to getenv at initialization
getenv is not threadsafe and (maybe as a result) it's randomly crashing with
CFLAGS=-g and RUST_THREADS=32. Calls from rust code are still on their
own.
2011-07-28 12:23:01 -07:00

31 lines
689 B
C++

// -*- c++ -*-
#ifndef RUST_SRV_H
#define RUST_SRV_H
#include "rust_internal.h"
class rust_srv {
public:
rust_env *env;
memory_region local_region;
virtual void log(char const *msg);
virtual void fatal(char const *expression,
char const *file,
size_t line,
char const *format,
...);
virtual void warning(char const *expression,
char const *file,
size_t line,
char const *format,
...);
virtual void free(void *);
virtual void *malloc(size_t);
virtual void *realloc(void *, size_t);
rust_srv(rust_env *);
virtual ~rust_srv();
virtual rust_srv *clone();
};
#endif /* RUST_SRV_H */