1 // Copyright 2014 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
11 static pthread_t thread
;
13 static void* threadfunc(void* dummy
) {
20 return pthread_create(&thread
, NULL
, &threadfunc
, NULL
);
25 pthread_cancel(thread
);
26 pthread_join(thread
, &r
);
27 return (r
== PTHREAD_CANCELED
);