comparison packages/kernel/current/include/thread.hxx @ 182:f62680ef1804

Merge from eCos master repository on 2001-09-07-06:43:02-BST
author jlarmour
date Wed, 12 Sep 2001 00:59:17 +0000
parents 0d0f03f76f6a
children e0c0827131d1
comparison
equal deleted inserted replaced
181:d61da071934c 182:f62680ef1804
425 // and is 1 if that index is free, and 0 if it is in use. 425 // and is 1 if that index is free, and 0 if it is in use.
426 static cyg_ucount32 thread_data_map; 426 static cyg_ucount32 thread_data_map;
427 427
428 public: 428 public:
429 429
430 static CYG_ADDRWORD get_data( cyg_ucount32 index ); 430 typedef cyg_count32 cyg_data_index;
431 431
432 static CYG_ADDRWORD *get_data_ptr( cyg_ucount32 index ); 432 static CYG_ADDRWORD get_data( cyg_data_index index );
433 433
434 void set_data( cyg_ucount32 index, CYG_ADDRWORD data ); 434 static CYG_ADDRWORD *get_data_ptr( cyg_data_index index );
435 435
436 static cyg_ucount32 new_data_index(); 436 void set_data( cyg_data_index index, CYG_ADDRWORD data );
437 437
438 static void free_data_index( cyg_ucount32 index ); 438 // returns -1 if no more indexes available
439 439 static cyg_data_index new_data_index();
440
441 static void free_data_index( cyg_data_index index );
442
443 #endif
444
445 #ifdef CYGPKG_KERNEL_THREADS_DESTRUCTORS
446
447 // thread destructors, called on thread exit.
448 private:
449 typedef void (*destructor_fn)(CYG_ADDRWORD);
450 struct Cyg_Destructor_Entry {
451 destructor_fn fn;
452 CYG_ADDRWORD data;
453 };
454 #ifndef CYGSEM_KERNEL_THREADS_DESTRUCTORS_PER_THREAD
455 static
456 #endif
457 Cyg_Destructor_Entry destructors[ CYGNUM_KERNEL_THREADS_DESTRUCTORS ];
458 public:
459
460 // Add and remove destructors. Returns true on success, false on failure.
461 static cyg_bool add_destructor( destructor_fn fn, CYG_ADDRWORD data );
462 static cyg_bool rem_destructor( destructor_fn fn, CYG_ADDRWORD data );
440 #endif 463 #endif
441 464
442 #ifdef CYGVAR_KERNEL_THREADS_NAME 465 #ifdef CYGVAR_KERNEL_THREADS_NAME
443 466
444 private: 467 private: