aboutsummaryrefslogtreecommitdiffstats
path: root/thread.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2006-09-14 03:49:14 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2006-09-14 03:49:14 +0000
commit703263e6b65990169fe9bc43745653d0a81c5372 (patch)
treef68946f0a651815ba1f967cb185de48a096bf5bb /thread.c
parent212bbdea54b079efd04437f79c87e35b088398c5 (diff)
downloadlcd4linux-703263e6b65990169fe9bc43745653d0a81c5372.tar.gz
[lcd4linux @ 2006-09-14 03:49:14 by reinelt]
indent run git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@713 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/thread.c b/thread.c
index 2aac128..d7cfcc9 100644
--- a/thread.c
+++ b/thread.c
@@ -1,4 +1,4 @@
-/* $Id: thread.c,v 1.9 2006/09/13 20:04:57 entropy Exp $
+/* $Id: thread.c,v 1.10 2006/09/14 03:49:14 reinelt Exp $
*
* thread handling (mutex, shmem, ...)
*
@@ -26,6 +26,9 @@
*
*
* $Log: thread.c,v $
+ * Revision 1.10 2006/09/14 03:49:14 reinelt
+ * indent run
+ *
* Revision 1.9 2006/09/13 20:04:57 entropy
* threads change argv[0] to their thread name, for a neat 'ps' output
*
@@ -111,7 +114,7 @@
#endif
-int thread_argc;
+int thread_argc;
char **thread_argv;
@@ -202,7 +205,7 @@ int thread_create(const char *name, void (*thread) (void *data), void *data)
pid_t pid, ppid;
ppid = getpid();
-
+
switch (pid = fork()) {
case -1:
error("fatal error: fork(%s) failed: %s", name, strerror(errno));
@@ -210,8 +213,8 @@ int thread_create(const char *name, void (*thread) (void *data), void *data)
case 0:
info("thread %s starting...", name);
if (thread_argc > 0) {
- strncpy(thread_argv[0],name,strlen(thread_argv[0]));
- }
+ strncpy(thread_argv[0], name, strlen(thread_argv[0]));
+ }
thread(data);
info("thread %s ended.", name);
exit(0);