FTK Changes. Added support for HP-UX built with the native compiler (aCC). Added extendFile() method to the file handle class -- this method will increase the size of a file in the most optimal way possible on the host platform.

git-svn-id: https://svn.code.sf.net/p/flaim/code/trunk@732 0109f412-320b-0410-ab79-c3e0c5ffbbe6
This commit is contained in:
ahodgkinson
2006-08-03 19:21:37 +00:00
parent a575399f58
commit 828f7f8e65
12 changed files with 538 additions and 260 deletions

View File

@@ -442,12 +442,8 @@ RCODE FLMAPI F_Thread::startThread(
unsigned uiThreadId;
#endif
#if defined( FLM_UNIX)
#if defined( _POSIX_THREADS)
pthread_attr_t thread_attr;
pthread_t uiThreadId;
#else
threadid_p uiThreadId;
#endif
pthread_attr_t thread_attr;
pthread_t uiThreadId;
#endif
f_assert( fnThread != NULL && m_fnThread == NULL);
@@ -574,33 +570,18 @@ RCODE FLMAPI F_Thread::startThread(
goto Exit;
}
#elif defined( FLM_UNIX)
#ifdef _POSIX_THREADS
pthread_attr_init( &thread_attr);
pthread_attr_setdetachstate( &thread_attr, PTHREAD_CREATE_DETACHED);
pthread_attr_init( &thread_attr);
pthread_attr_setdetachstate( &thread_attr, PTHREAD_CREATE_DETACHED);
if (pthread_create( &uiThreadId, &thread_attr,
threadStub, this) != 0)
{
rc = RC_SET( NE_FLM_COULD_NOT_START_THREAD);
goto Exit;
}
#else
m_uiStackSize = f_max( m_uiStackSize, thr_minstack());
m_uiStackSize = f_max( m_uiStackSize, thr_min_stack());
if (pthread_create( &uiThreadId, &thread_attr,
threadStub, this) != 0)
{
rc = RC_SET( NE_FLM_COULD_NOT_START_THREAD);
goto Exit;
}
if( thr_create( (void*)NULL, (size_t)uiStackSize,
threadStub, this, (long)0, &uiThreadId) != 0)
{
rc = RC_SET( NE_FLM_COULD_NOT_START_THREAD);
goto Exit;
}
#endif
m_uiThreadId = (FLMUINT)uiThreadId;
#ifdef _POSIX_THREADS
pthread_attr_destroy( &thread_attr);
#endif
m_uiThreadId = (FLMUINT)uiThreadId;
pthread_attr_destroy( &thread_attr);
#endif
// Code is not designed to handle a thread ID of 0