Ticket #5170: thread.patch

File thread.patch, 1.8 KB (added by Luke Moore <luke.moore@…>, 12 years ago)

Patch to add static specifier to extern "C" functions

  • libs/thread/src/pthread/

    old new  
    5050
    5151            extern "C"
    5252            {
    53                 void tls_destructor(void* data)
     53                static void tls_destructor(void* data)
    5454                {
    5555                    boost::detail::thread_data_base* thread_info=static_cast<boost::detail::thread_data_base*>(data);
    5656                    if(thread_info)
     
    111111    {
    112112        extern "C"
    113113        {
    114             void* thread_proxy(void* param)
     114            static void* thread_proxy(void* param)
    115115            {
    116116                boost::detail::thread_data_ptr thread_info = static_cast<boost::detail::thread_data_base*>(param)->self;
    117117                thread_info->self.reset();
  • libs/thread/src/pthread/

    old new  
    2222            pthread_key_t epoch_tss_key;
    2323            pthread_once_t epoch_tss_key_flag=PTHREAD_ONCE_INIT;
    2424           
    25             extern "C" void delete_epoch_tss_data(void* data)
     25            extern "C"
    2626            {
    27                 free(data);
     27                static void delete_epoch_tss_data(void* data)
     28                {
     29                    free(data);
     30                }
    2831            }
    2932
    30             extern "C" void create_epoch_tss_key()
     33            extern "C"
    3134            {
    32                 BOOST_VERIFY(!pthread_key_create(&epoch_tss_key,delete_epoch_tss_data));
     35                static void create_epoch_tss_key()
     36                {
     37                    BOOST_VERIFY(!pthread_key_create(&epoch_tss_key,delete_epoch_tss_data));
     38                }
    3339            }
    3440           
    3541        }