Allow linking against system libraries for almost everything (#1790)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#include "global.h"
|
||||
#include "Threads_Pthreads.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageTimer.h"
|
||||
#include "RageThreads.h"
|
||||
#include "RageUtil.h"
|
||||
#include <sys/time.h>
|
||||
#include <errno.h>
|
||||
@@ -17,6 +19,7 @@
|
||||
|
||||
void ThreadImpl_Pthreads::Halt( bool Kill )
|
||||
{
|
||||
(void)Kill;
|
||||
/* Linux:
|
||||
* Send a SIGSTOP to the thread. If we send a SIGKILL, pthreads will
|
||||
* "helpfully" propagate it to the other threads, and we'll get killed, too.
|
||||
@@ -105,7 +108,7 @@ ThreadImpl *MakeThread( int (*pFunc)(void *pData), void *pData, uint64_t *piThre
|
||||
} else {
|
||||
// Abbreviate the name by taking the first 6, last 7
|
||||
// characters and adding '..' in the middle.
|
||||
LOG->Trace( "Truncated thread name due to size limit of %d: %s",
|
||||
LOG->Trace( "Truncated thread name due to size limit of %zu: %s",
|
||||
maxNameLen, rawname );
|
||||
snprintf( thread->name, maxNameLen, "%.6s..%s",
|
||||
rawname, &rawname[strlen(rawname) - 7] );
|
||||
|
||||
@@ -10,6 +10,7 @@ class ThreadImpl_Pthreads: public ThreadImpl
|
||||
{
|
||||
public:
|
||||
pthread_t thread;
|
||||
mutable char name[16];
|
||||
|
||||
/* Linux:
|
||||
* Keep a list of child PIDs, so we can send them SIGKILL. This has
|
||||
@@ -99,7 +100,7 @@ private:
|
||||
/*
|
||||
* (c) 2001-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -109,7 +110,7 @@ private:
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
Reference in New Issue
Block a user