diff options
| author | Alexey Zelkin <phantom@FreeBSD.org> | 2003-02-03 10:08:45 +0000 |
|---|---|---|
| committer | Alexey Zelkin <phantom@FreeBSD.org> | 2003-02-03 10:08:45 +0000 |
| commit | 618a8b4df089faeb7aa019ef7aa5b8ac49a37e42 (patch) | |
| tree | b2102f390b02be7c6ec90403e5b950753ef3e7de | |
| parent | 8dad14b11bfd6c997b6568d979ddb4f16e05a57a (diff) | |
Notes
| -rw-r--r-- | lib/libc_r/uthread/uthread_attr_get_np.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/uthread_attr_get_np.c b/lib/libc_r/uthread/uthread_attr_get_np.c index a427f79bed54..ba6fd19655fc 100644 --- a/lib/libc_r/uthread/uthread_attr_get_np.c +++ b/lib/libc_r/uthread/uthread_attr_get_np.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002 Alexey Zelkin <phantom@FreeBSD.org> + * Copyright (c) 2002,2003 Alexey Zelkin <phantom@FreeBSD.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -45,5 +45,13 @@ _pthread_attr_get_np(pthread_t pid, pthread_attr_t *dst) return (ret); memcpy(*dst, &pid->attr, sizeof(struct pthread_attr)); + + /* + * Special case, if stack address was not provided by caller + * of pthread_create(), then return address allocated internally + */ + if ((*dst)->stackaddr_attr == NULL) + (*dst)->stackaddr_attr = pid->stack; + return (0); } |
