-/* $OpenBSD: thread_private.h,v 1.36 2021/01/06 19:54:17 otto Exp $ */
+/* $OpenBSD: thread_private.h,v 1.37 2024/08/18 02:25:51 guenther Exp $ */
/* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> */
#ifndef _THREAD_PRIVATE_H_
#define _THREAD_PRIVATE_H_
-#include <stdio.h> /* for FILE and __isthreaded */
+extern int __isthreaded;
#define _MALLOC_MUTEXES 32
void _malloc_init(int);
* Returns the address of the thread's TCB.
*/
+struct __sFILE;
struct pthread;
struct thread_callbacks {
int *(*tc_errnoptr)(void); /* MUST BE FIRST */
void *(*tc_tcb)(void);
__dead void (*tc_canceled)(void);
- void (*tc_flockfile)(FILE *);
- int (*tc_ftrylockfile)(FILE *);
- void (*tc_funlockfile)(FILE *);
+ void (*tc_flockfile)(struct __sFILE *);
+ int (*tc_ftrylockfile)(struct __sFILE *);
+ void (*tc_funlockfile)(struct __sFILE *);
void (*tc_malloc_lock)(int);
void (*tc_malloc_unlock)(int);
void (*tc_atexit_lock)(void);
-/* $OpenBSD: rthread_cb.h,v 1.3 2021/01/06 19:54:17 otto Exp $ */
+/* $OpenBSD: rthread_cb.h,v 1.4 2024/08/18 02:25:51 guenther Exp $ */
/*
* Copyright (c) 2016 Philip Guenther <guenther@openbsd.org>
* All Rights Reserved.
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <stdio.h>
+struct __sFILE;
__BEGIN_HIDDEN_DECLS
-void _thread_flockfile(FILE *);
-int _thread_ftrylockfile(FILE *);
-void _thread_funlockfile(FILE *);
+void _thread_flockfile(struct __sFILE *);
+int _thread_ftrylockfile(struct __sFILE *);
+void _thread_funlockfile(struct __sFILE *);
void _thread_malloc_lock(int);
void _thread_malloc_unlock(int);
void _thread_atexit_lock(void);