mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
add set_threadname function
Origin commit data
------------------
Branch: master
Commit: 3ed147cab7
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-10-05 (Sat, 05 Oct 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -3,6 +3,10 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/prctl.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
int cnxt_debug = 0; /* compat, unused */
|
int cnxt_debug = 0; /* compat, unused */
|
||||||
|
|
||||||
@@ -76,3 +80,11 @@ void lt_debug_init(void)
|
|||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void hal_set_threadname(const char *name)
|
||||||
|
{
|
||||||
|
char threadname[17];
|
||||||
|
strncpy(threadname, name, sizeof(threadname));
|
||||||
|
threadname[16] = 0;
|
||||||
|
prctl (PR_SET_NAME, (unsigned long)&threadname);
|
||||||
|
}
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
extern int debuglevel;
|
extern int debuglevel;
|
||||||
|
|
||||||
|
void hal_set_threadname(const char *name);
|
||||||
void _lt_debug(int facility, const void *, const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
|
void _lt_debug(int facility, const void *, const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
|
||||||
void _lt_info(int facility, const void *, const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
|
void _lt_info(int facility, const void *, const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
|
||||||
void lt_debug_init(void);
|
void lt_debug_init(void);
|
||||||
|
Reference in New Issue
Block a user