Changeset 431 for branches/thune/thread_safe/urlan.c
- Timestamp:
- 07/16/07 03:30:29 (17 months ago)
- Files:
-
- 1 modified
-
branches/thune/thread_safe/urlan.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/thune/thread_safe/urlan.c
r427 r431 411 411 int i; 412 412 413 //printf( "KR sizeof(pthread_t) = %lu\n", sizeof(pthread_t) ); 414 //assert( sizeof(UCellThread) == 16 ); 415 413 416 assert( sizeof(UCell) == 16 ); 414 417 //assert( sizeof(LocalFrame) == 16 ); … … 451 454 \param customCount Number of UDatatype in custom array. 452 455 453 \return sUR_EVAL_ code.456 \return UR_EVAL_ code. 454 457 */ 455 458 int ur_startup( UrlanEnv* env, UDatatype* custom, int customCount ) … … 467 470 env->dtCount = UT_BI_COUNT + customCount; 468 471 469 ur_arrayInit( &env->atoms, sizeof(AtomRec), 4096);470 ur_arrayInit( &env->atomNames, sizeof(char), 2048 );472 ur_arrayInit( &env->atoms, sizeof(AtomRec), 2048 ); 473 ur_arrayInit( &env->atomNames, sizeof(char), 2048 * 6 ); 471 474 ur_arrayInit( &env->devices, sizeof(UPortDevice*), 8 ); 472 475 ur_rebuildAtomHash( &env->atoms ); … … 485 488 // Init main thread. 486 489 487 if( mutexInit( env->mutex ) == -1 ) 488 { 489 #ifndef _WIN32 490 if( mutexInitF( env->mutex ) ) 491 { 492 #ifdef _WIN32 493 //GetLastError(); 494 #else 490 495 perror( "mutexInit" ); 491 496 #endif … … 495 500 ut = ur_threadMake( env, 512, 1024 ); 496 501 497 // Make hold & global context blocks.498 ur_makeBlock( 8 ); // 0 - BLK_THREAD_HOLD499 ur_makeBlock( 1024 ); // 1 - BLK_GLOBAL_WORD500 ur_makeBlock( 1024 ); // 2 - BLK_GLOBAL_VAL501 ur_makeBlock( 1 ); // 3 - BLK_CTX_STACK502 //ur_makeBlock( 0 ); // 4 - BLK_DSTACK503 504 ur_pushContext( ut, (UCell*) &ur_thrGlobal );505 506 {507 //UBlock* blk = ur_tblockPtr( BLK_DSTACK );508 }509 502 510 503 // Add datatypes first so UT_ defines match the index & atom.
