File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 405405#define BOOST_THREAD_FUTURE_USES_OPTIONAL
406406#endif
407407
408- #if BOOST_WORKAROUND(__BORLANDC__ , < 0x600)
408+ #if BOOST_WORKAROUND(BOOST_BORLANDC , < 0x600)
409409# pragma warn -8008 // Condition always true/false
410410# pragma warn -8080 // Identifier declared but never used
411411# pragma warn -8057 // Parameter never used
Original file line number Diff line number Diff line change @@ -601,6 +601,9 @@ namespace boost
601601 class BOOST_SYMBOL_VISIBLE thread::id
602602 {
603603 private:
604+
605+ #if !defined(BOOST_EMBTC)
606+
604607 friend inline
605608 std::size_t
606609 hash_value (const thread::id &v)
@@ -612,6 +615,14 @@ namespace boost
612615#endif
613616 }
614617
618+ #else
619+
620+ friend
621+ std::size_t
622+ hash_value (const thread::id &v);
623+
624+ #endif
625+
615626#if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
616627#if defined(BOOST_THREAD_PLATFORM_WIN32)
617628 typedef unsigned int data;
@@ -704,6 +715,21 @@ namespace boost
704715#endif
705716#endif
706717 };
718+
719+ #if defined(BOOST_EMBTC)
720+
721+ inline
722+ std::size_t
723+ hash_value (const thread::id &v)
724+ {
725+ #if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
726+ return hash_value (v.thread_data );
727+ #else
728+ return hash_value (v.thread_data .get ());
729+ #endif
730+ }
731+
732+ #endif
707733
708734#ifdef BOOST_THREAD_PLATFORM_PTHREAD
709735 inline thread::id thread::get_id () const BOOST_NOEXCEPT
Original file line number Diff line number Diff line change @@ -145,6 +145,8 @@ namespace boost
145145 {}
146146 virtual ~thread_data_base ();
147147
148+ #if !defined(BOOST_EMBTC)
149+
148150 friend void intrusive_ptr_add_ref (thread_data_base * p)
149151 {
150152 BOOST_INTERLOCKED_INCREMENT (&p->count );
@@ -158,6 +160,13 @@ namespace boost
158160 }
159161 }
160162
163+ #else
164+
165+ friend void intrusive_ptr_add_ref (thread_data_base * p);
166+ friend void intrusive_ptr_release (thread_data_base * p);
167+
168+ #endif
169+
161170#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
162171 void interrupt ()
163172 {
@@ -180,6 +189,24 @@ namespace boost
180189 }
181190// #endif
182191 };
192+
193+ #if defined(BOOST_EMBTC)
194+
195+ inline void intrusive_ptr_add_ref (thread_data_base * p)
196+ {
197+ BOOST_INTERLOCKED_INCREMENT (&p->count );
198+ }
199+
200+ inline void intrusive_ptr_release (thread_data_base * p)
201+ {
202+ if (!BOOST_INTERLOCKED_DECREMENT (&p->count ))
203+ {
204+ detail::heap_delete (p);
205+ }
206+ }
207+
208+ #endif
209+
183210 BOOST_THREAD_DECL thread_data_base* get_current_thread_data ();
184211
185212 typedef boost::intrusive_ptr<detail::thread_data_base> thread_data_ptr;
Original file line number Diff line number Diff line change 1313
1414 #include < windows.h>
1515
16- #if defined(__BORLANDC__ )
16+ #if defined(BOOST_BORLANDC )
1717 extern " C" BOOL WINAPI DllEntryPoint (HINSTANCE /* hInstance*/ , DWORD dwReason, LPVOID /* lpReserved*/ )
18+ #elif defined (BOOST_EMBTC)
19+ extern "C" int _libmain(DWORD dwReason)
1820 #elif defined (_WIN32_WCE)
1921 extern "C" BOOL WINAPI DllMain(HANDLE /* hInstance*/ , DWORD dwReason, LPVOID /* lpReserved*/ )
2022 #else
You can’t perform that action at this time.
0 commit comments