Paste number 12030: test

Index of paste annotations: 1

Paste number 12030: test
Pasted by: pinskia
When:4 years, 10 months ago
Share:Tweet this! | http://paste.lisp.org/+9A6
Channel:None
Paste contents:
Raw Source | XML | Display As
pthread_key_t a;
struct A
{
A(){pthread_key_create(&a, NULL);}
~A(){pthread_key_delete(a);}
int t(){return 0;}
};

A aa;

int main(){return aa.t();}

Annotations for this paste:

Annotation number 1: new testcase
Pasted by: pinskia
When:4 years, 10 months ago
Share:Tweet this! | http://paste.lisp.org/+9A6/1
Paste contents:
Raw Source | Display As
#include <pthread.h>

pthread_key_t a;


struct A
{
A(){pthread_key_create(&a, NULL);}
~A(){pthread_key_delete(a);}
int t(){return 0;}
};

A aa;
void* threadfunc(void* x)
{
  pthread_setspecific (a, (void*)1);
  return NULL;
}

int main()
{
  pthread_t thr;

  pthread_create(&thr, NULL, &threadfunc, NULL);
  pthread_join(thr, NULL);
  pthread_setspecific (a, (void*)1);
return aa.t();

}

Colorize as:
Show Line Numbers
Index of paste annotations: 1

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.