YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
Wedropthenamespaceprefix,becausethesethreadnamesare truncatedto15charactersonLinux,andsomethinglike"innodb/"would alreadytakeupabouthalfofthat.
*/ staticvoid dbug_verify_thread_name(constchar *name)
{ constchar *psi_name= NULL; constchar *thread_class_name= PSI_THREAD_CALL(get_thread_class_name)(); if (thread_class_name)
{ /* Remove the path prefix */ constchar *last_part= strrchr(thread_class_name, '/'); if (last_part)
psi_name= last_part + 1; else
psi_name= thread_class_name;
} if (psi_name && strcmp(psi_name, name))
{
fprintf(stderr, "ERROR: my_thread_set_name() mismatch: PSI name '%s' != '%s'\n",
psi_name, name);
abort();
}
size_t len= strlen(name); if (len > 15)
{ /* Linux can' handle "long" (> 15 chars) names */
fprintf(stderr, "ERROR: my_thread_set_name() name too long: '%s'\n", name);
abort();
}
} #else #define dbug_verify_thread_name(name) do {} while (0) #endif
/* Set current thread name for debugger/profiler and similar tools. */ extern"C"void my_thread_set_name(constchar *name)
{
dbug_verify_thread_name(name);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.