summaryrefslogtreecommitdiffhomepage
path: root/src/thread/nt64/__set_thread_area.c
blob: 834067a42e4937c05417182358d677664f741292 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/**************************************************************************/
/*  mmglue: midipix architecture- and target-specific bits for musl libc  */
/*  Copyright (C) 2013--2023  SysDeer Technologies, LLC                   */
/*  Released under the Standard MIT License; see COPYING.MMGLUE.          */
/**************************************************************************/

#include <errno.h>
#include "pthread_impl.h"

int __set_thread_area(void * p)
{
	struct pthread ** ptlca;

	ptlca = __psx_tlca();
	if (!ptlca) return -ESRCH;

	*ptlca = p;
	return 0;
}