thr_ctrdtr.c (98e0ffaefb0f241cda3a72395d3be04192ae0d47) thr_ctrdtr.c (8de1a8131e42f96f8dcfbca9073896d249ff7d2c)
1/*-
2 * Copyright (C) 2003 Jake Burkholder <jake@freebsd.org>
3 * Copyright (C) 2003 David Xu <davidxu@freebsd.org>
4 * Copyright (c) 2001,2003 Daniel Eischen <deischen@freebsd.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 28 unchanged lines hidden (view full) ---

37struct tcb *
38_tcb_ctor(struct pthread *thread, int initial)
39{
40 struct tcb *tcb;
41
42 if (initial)
43 tcb = _tcb_get();
44 else
1/*-
2 * Copyright (C) 2003 Jake Burkholder <jake@freebsd.org>
3 * Copyright (C) 2003 David Xu <davidxu@freebsd.org>
4 * Copyright (c) 2001,2003 Daniel Eischen <deischen@freebsd.org>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 28 unchanged lines hidden (view full) ---

37struct tcb *
38_tcb_ctor(struct pthread *thread, int initial)
39{
40 struct tcb *tcb;
41
42 if (initial)
43 tcb = _tcb_get();
44 else
45 tcb = _rtld_allocate_tls(NULL, sizeof(struct tcb), 16);
45 tcb = _rtld_allocate_tls(NULL, TLS_TCB_SIZE, TLS_TCB_ALIGN);
46 if (tcb)
47 tcb->tcb_thread = thread;
48 return (tcb);
49}
50
51void
52_tcb_dtor(struct tcb *tcb)
53{
54
46 if (tcb)
47 tcb->tcb_thread = thread;
48 return (tcb);
49}
50
51void
52_tcb_dtor(struct tcb *tcb)
53{
54
55 _rtld_free_tls(tcb, sizeof(struct tcb), 16);
55 _rtld_free_tls(tcb, TLS_TCB_SIZE, TLS_TCB_ALIGN);
56}
56}