Subversion Repositories HelenOS-historic

Rev

Rev 1217 | Rev 1624 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1217 Rev 1286
Line 31... Line 31...
31
 
31
 
32
/** Allocate TLS & TCB for initial module threads
32
/** Allocate TLS & TCB for initial module threads
33
 *
33
 *
34
 * @param data Start of data section
34
 * @param data Start of data section
35
 * @return pointer to tcb_t structure
35
 * @return pointer to tcb_t structure
-
 
36
 *
36
 */
37
 */
37
tcb_t * __alloc_tls(void **data, size_t size)
38
tcb_t * __alloc_tls(void **data, size_t size)
38
{
39
{
39
    tcb_t *tcb;
40
    tcb_t *tcb;
40
   
41
   
41
    *data = malloc(sizeof(tcb_t) + size);
42
    *data = malloc(sizeof(tcb_t) + size);
42
 
-
 
43
    tcb = (tcb_t *) (*data + size);
43
    tcb = (tcb_t *) (*data + size);
44
 
-
 
45
    return tcb;
44
    return tcb;
46
}
45
}
47
 
46
 
48
void __free_tls_arch(tcb_t *tcb, size_t size)
47
void __free_tls_arch(tcb_t *tcb, size_t size)
49
{
48
{