Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 5 years ago

Language

Compiler

Options

Author

anonymous

about 5 years ago

$
prog.cc:47:29: error: reference to 'mutex' is ambiguous
        pthread_mutex_lock(&mutex);
                            ^
prog.cc:28:17: note: candidate found by name lookup is 'mutex'
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
                ^
/opt/wandbox/clang-10.0.0/include/c++/v1/__mutex_base:32:78: note: candidate found by name lookup is 'std::__1::mutex'
class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
                                                                             ^
prog.cc:69:35: error: reference to 'mutex' is ambiguous
            pthread_mutex_unlock(&mutex);
                                  ^
prog.cc:28:17: note: candidate found by name lookup is 'mutex'
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
                ^
/opt/wandbox/clang-10.0.0/include/c++/v1/__mutex_base:32:78: note: candidate found by name lookup is 'std::__1::mutex'
class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
                                                                             ^
prog.cc:82:31: error: reference to 'mutex' is ambiguous
        pthread_mutex_unlock(&mutex);
                              ^
prog.cc:28:17: note: candidate found by name lookup is 'mutex'
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
                ^
/opt/wandbox/clang-10.0.0/include/c++/v1/__mutex_base:32:78: note: candidate found by name lookup is 'std::__1::mutex'
class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
                                                                             ^
prog.cc:94:29: error: reference to 'mutex' is ambiguous
        pthread_mutex_lock(&mutex);
                            ^
prog.cc:28:17: note: candidate found by name lookup is 'mutex'
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
                ^
/opt/wandbox/clang-10.0.0/include/c++/v1/__mutex_base:32:78: note: candidate found by name lookup is 'std::__1::mutex'
class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
                                                                             ^
prog.cc:127:50: error: reference to 'mutex' is ambiguous
            pthread_cond_wait(&dataNotProduced, &mutex);
                                                 ^
prog.cc:28:17: note: candidate found by name lookup is 'mutex'
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
                ^
/opt/wandbox/clang-10.0.0/include/c++/v1/__mutex_base:32:78: note: candidate found by name lookup is 'std::__1::mutex'
class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
                                                                             ^
prog.cc:131:31: error: reference to 'mutex' is ambiguous
        pthread_mutex_unlock(&mutex);
                              ^
prog.cc:28:17: note: candidate found by name lookup is 'mutex'
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
                ^
/opt/wandbox/clang-10.0.0/include/c++/v1/__mutex_base:32:78: note: candidate found by name lookup is 'std::__1::mutex'
class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
                                                                             ^
prog.cc:143:29: error: reference to 'mutex' is ambiguous
        pthread_mutex_lock(&mutex);
                            ^
prog.cc:28:17: note: candidate found by name lookup is 'mutex'
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
                ^
/opt/wandbox/clang-10.0.0/include/c++/v1/__mutex_base:32:78: note: candidate found by name lookup is 'std::__1::mutex'
class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
                                                                             ^
prog.cc:177:50: error: reference to 'mutex' is ambiguous
            pthread_cond_wait(&dataNotProduced, &mutex);
                                                 ^
prog.cc:28:17: note: candidate found by name lookup is 'mutex'
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
                ^
/opt/wandbox/clang-10.0.0/include/c++/v1/__mutex_base:32:78: note: candidate found by name lookup is 'std::__1::mutex'
class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
                                                                             ^
prog.cc:181:31: error: reference to 'mutex' is ambiguous
        pthread_mutex_unlock(&mutex);
                              ^
prog.cc:28:17: note: candidate found by name lookup is 'mutex'
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
                ^
/opt/wandbox/clang-10.0.0/include/c++/v1/__mutex_base:32:78: note: candidate found by name lookup is 'std::__1::mutex'
class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
                                                                             ^
prog.cc:195:9: warning: unused variable 'retProducer' [-Wunused-variable]
    int retProducer = pthread_create(&producerThread,
        ^
prog.cc:197:9: warning: unused variable 'retConsumer1' [-Wunused-variable]
    int retConsumer1 = pthread_create(&consumerThread1,
        ^
prog.cc:199:9: warning: unused variable 'retConsumer2' [-Wunused-variable]
    int retConsumer2 = pthread_create(&consumerThread2,
        ^
3 warnings and 9 errors generated.
Exit Code:
1