#include <unistd.h>
#include <sys/time.h>
#include <sys/wait.h>
-#include <pthread.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <signal.h>
#endif
#include "os.hpp"
-#include "os_path.hpp"
+#include "os_string.hpp"
namespace os {
-static pthread_mutex_t
-mutex = PTHREAD_MUTEX_INITIALIZER;
-
-
-void
-acquireMutex(void)
-{
- pthread_mutex_lock(&mutex);
-}
-
-
-void
-releaseMutex(void)
-{
- pthread_mutex_unlock(&mutex);
-}
-
-
-Path
+String
getProcessName(void)
{
- Path path;
+ String path;
size_t size = PATH_MAX;
char *buf = path.buf(size);
return path;
}
-Path
+String
getCurrentDir(void)
{
- Path path;
+ String path;
size_t size = PATH_MAX;
char *buf = path.buf(size);
}
bool
-Path::exists(void) const
+String::exists(void) const
{
struct stat st;
int err;