c11_tss.c revision fc2512cfb727d49529d8ed99164db871f4829b73
/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
*/
/*
* Copyright 2016 Joyent, Inc.
*/
/*
* Test various C11 thread-specific storage (tss(3C)) interfaces.
*/
#include <threads.h>
#define TSS_NTHREADS 128
static int ct_count;
static int ct_ready;
static void
ct_tss_dtor(void *arg)
{
ct_count++;
}
static int
ct_tss_thr(void *arg)
{
ct_ready++;
if (ct_ready == TSS_NTHREADS) {
} else {
while (ct_ready != TSS_NTHREADS) {
}
}
return (0);
}
int
main(void)
{
int i;
for (i = 0; i < TSS_NTHREADS; i++) {
}
for (i = 0; i < TSS_NTHREADS; i++) {
}
return (0);
}