]> git.pond.sub.org Git - empserver/blobdiff - src/lib/empthread/pthread.c
Fix trailing whitespace
[empserver] / src / lib / empthread / pthread.c
index a3c9ab445bd1a38932ae86d1b16737a23ea7ba08..aa8b56949f1d11ca9984b15841fdcbf8274da93e 100644 (file)
@@ -26,7 +26,7 @@
  *  ---
  *
  *  pthread.c: Interface from Empire threads to POSIX threads
- * 
+ *
  *  Known contributors to this file:
  *     Sasha Mikheev
  *     Steve McClure, 1998
@@ -247,6 +247,20 @@ empth_self(void)
     return pthread_getspecific(ctx_key);
 }
 
+char *
+empth_name(empth_t *thread)
+{
+    return thread->name;
+}
+
+void
+empth_set_name(empth_t *thread, char *name)
+{
+    if (thread->name)
+       free(thread->name);
+    thread->name = strdup(name);
+}
+
 void
 empth_exit(void)
 {