mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 00:37:46 +08:00
Updated cmake for ARM/Android build
This commit is contained in:
@@ -84,9 +84,10 @@ class UThreadC
|
||||
|
||||
static void Exit()
|
||||
{ pthread_exit(0); }
|
||||
|
||||
#ifndef ANDROID
|
||||
static void TestCancel()
|
||||
{ pthread_testcancel(); }
|
||||
#endif
|
||||
|
||||
static Handle Self()
|
||||
{ return (Handle)pthread_self(); }
|
||||
@@ -163,8 +164,10 @@ class UThreadC
|
||||
static int Join( Handle H )
|
||||
{ return pthread_join(H,0); }
|
||||
|
||||
#ifndef ANDROID
|
||||
static int Kill( Handle H )
|
||||
{ return pthread_cancel(H); }
|
||||
#endif
|
||||
|
||||
static int Detach( Handle H )
|
||||
{ return pthread_detach(H); }
|
||||
@@ -180,6 +183,7 @@ class UThreadC
|
||||
Thread_T Data(I.Data);
|
||||
S_Create().release();
|
||||
|
||||
#ifndef ANDROID
|
||||
if ( I.Flags & 1 /*CancelEnable*/ )
|
||||
{
|
||||
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,NULL);
|
||||
@@ -193,6 +197,7 @@ class UThreadC
|
||||
{
|
||||
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE,NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( I.Owner )
|
||||
I.Owner->ThreadMain(Data);
|
||||
@@ -237,8 +242,10 @@ class UThreadC<void>
|
||||
static void Exit()
|
||||
{ pthread_exit(0); }
|
||||
|
||||
#ifndef ANDROID
|
||||
static void TestCancel()
|
||||
{ pthread_testcancel(); }
|
||||
#endif
|
||||
|
||||
static Handle Self()
|
||||
{ return (Handle)pthread_self(); }
|
||||
@@ -347,8 +354,10 @@ class UThreadC<void>
|
||||
static int Join( Handle H )
|
||||
{ return pthread_join(H,0); }
|
||||
|
||||
#ifndef ANDROID
|
||||
static int Kill( Handle H )
|
||||
{ return pthread_cancel(H); }
|
||||
#endif
|
||||
|
||||
static int Detach( Handle H )
|
||||
{ return pthread_detach(H); }
|
||||
@@ -363,6 +372,7 @@ class UThreadC<void>
|
||||
Instance I(*Param);
|
||||
S_Create().release();
|
||||
|
||||
#ifndef ANDROID
|
||||
if ( I.Flags & 1 /*CancelEnable*/ )
|
||||
{
|
||||
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,NULL);
|
||||
@@ -376,6 +386,7 @@ class UThreadC<void>
|
||||
{
|
||||
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE,NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( I.Owner )
|
||||
I.Owner->ThreadMain();
|
||||
|
||||
@@ -245,8 +245,10 @@ private:
|
||||
//Methods from UThread<void> class hided
|
||||
static int Join( Handle H )
|
||||
{ return UThreadC<void>::Join(H); }
|
||||
#ifndef ANDROID
|
||||
static int Kill( Handle H )
|
||||
{ return UThreadC<void>::Kill(H); }
|
||||
#endif
|
||||
static int Detach( Handle H )
|
||||
{ return UThreadC<void>::Detach(H); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user