MCPcopy Create free account
hub / github.com/acl-dev/acl / acl_strerror1

Function acl_strerror1

lib_acl/src/stdlib/acl_msg.c:680–704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

678static acl_pthread_once_t once_control = ACL_PTHREAD_ONCE_INIT;
679
680const char *acl_strerror1(unsigned int errnum)
681{
682 char *buf;
683 static int __buf_size = 4096;
684
685 if (acl_pthread_once(&once_control, thread_buf_init) != 0) {
686 abort();
687 }
688
689 buf = acl_pthread_getspecific(__errbuf_key);
690 if (buf == NULL) {
691 buf = acl_mymalloc(__buf_size);
692 if (acl_pthread_setspecific(__errbuf_key, buf) != 0) {
693 abort();
694 }
695#if !defined(HAVE_NO_ATEXIT)
696 if ((unsigned long) acl_pthread_self()
697 == acl_main_thread_self()) {
698 __main_buf = buf;
699 atexit(main_free_buf);
700 }
701#endif
702 }
703 return acl_strerror(errnum, buf, __buf_size);
704}
705
706const char *acl_last_serror(void)
707{

Callers 2

acl_last_serrorFunction · 0.85
acl_vstream_strerrorFunction · 0.85

Calls 6

acl_pthread_onceFunction · 0.85
acl_pthread_getspecificFunction · 0.85
acl_pthread_setspecificFunction · 0.85
acl_pthread_selfFunction · 0.85
acl_main_thread_selfFunction · 0.85
acl_strerrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…