diff options
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 42 |
1 files changed, 9 insertions, 33 deletions
@@ -1,4 +1,5 @@ -/* $Id: thread.c,v 1.8 2006/07/12 21:01:41 reinelt Exp $ +/* $Id: thread.c 728 2007-01-14 11:14:38Z michael $ + * $URL: https://ssl.bulix.org/svn/lcd4linux/branches/0.10.1/thread.c $ * * thread handling (mutex, shmem, ...) * @@ -24,38 +25,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * - * $Log: thread.c,v $ - * Revision 1.8 2006/07/12 21:01:41 reinelt - * thread_destroy, minor cleanups - * - * Revision 1.7 2005/05/08 04:32:45 reinelt - * CodingStyle added and applied - * - * Revision 1.6 2005/01/18 06:30:23 reinelt - * added (C) to all copyright statements - * - * Revision 1.5 2004/06/20 10:09:56 reinelt - * - * 'const'ified the whole source - * - * Revision 1.4 2004/06/01 06:45:30 reinelt - * - * some Fixme's processed - * documented some code - * - * Revision 1.3 2004/04/08 10:48:25 reinelt - * finished plugin_exec - * modified thread handling - * added '%x' format to qprintf (hexadecimal) - * - * Revision 1.2 2004/03/20 07:31:33 reinelt - * support for HD66712 (which has a different RAM layout) - * further threading development - * - * Revision 1.1 2004/03/19 06:37:47 reinelt - * asynchronous thread handling started - * */ /* @@ -108,6 +77,10 @@ #endif +int thread_argc; +char **thread_argv; + + /* glibc 2.1 requires defining semun ourselves */ #ifdef _SEM_SEMUN_UNDEFINED union semun { @@ -202,6 +175,9 @@ int thread_create(const char *name, void (*thread) (void *data), void *data) return -1; case 0: info("thread %s starting...", name); + if (thread_argc > 0) { + strncpy(thread_argv[0], name, strlen(thread_argv[0])); + } thread(data); info("thread %s ended.", name); exit(0); |