summaryrefslogtreecommitdiffhomepage
path: root/examples/sptr_pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sptr_pthread.c')
-rw-r--r--examples/sptr_pthread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/sptr_pthread.c b/examples/sptr_pthread.c
index cffafd3d..0a1b7c79 100644
--- a/examples/sptr_pthread.c
+++ b/examples/sptr_pthread.c
@@ -20,8 +20,8 @@ void Base_del(Base* b) { printf("Base::~Base()\n"); }
void* thr(csptr_base* lp)
{
- static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
sleep(1);
+ static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
c_autoscope (pthread_mutex_lock(&mtx), pthread_mutex_unlock(&mtx))
{
printf("local pointer in a thread:\n"