Changeset 7faabb7 in mainline
- Timestamp:
- 2008-11-07T23:16:28Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 24345a5
- Parents:
- 86e3d62
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/proc/thread.h
r86e3d62 r7faabb7 260 260 261 261 /* Thread syscall prototypes. */ 262 extern unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name, thread_id_t *uspace_thread_id); 262 extern unative_t sys_thread_create(uspace_arg_t *uspace_uarg, 263 char *uspace_name, size_t name_len, thread_id_t *uspace_thread_id); 263 264 extern unative_t sys_thread_exit(int uspace_status); 264 265 extern unative_t sys_thread_get_id(thread_id_t *uspace_thread_id); -
kernel/generic/src/proc/thread.c
r86e3d62 r7faabb7 709 709 */ 710 710 unative_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name, 711 thread_id_t *uspace_thread_id)711 size_t name_len, thread_id_t *uspace_thread_id) 712 712 { 713 713 thread_t *t; … … 716 716 int rc; 717 717 718 rc = copy_from_uspace(namebuf, uspace_name, THREAD_NAME_BUFLEN); 718 if (name_len >= THREAD_NAME_BUFLEN) 719 name_len = THREAD_NAME_BUFLEN - 1; 720 721 rc = copy_from_uspace(namebuf, uspace_name, name_len); 719 722 if (rc != 0) 720 723 return (unative_t) rc; 724 725 namebuf[name_len] = '\0'; 721 726 722 727 /* -
uspace/lib/libc/generic/thread.c
r86e3d62 r7faabb7 109 109 uarg->uspace_uarg = uarg; 110 110 111 rc = __SYSCALL 3(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name,112 (sysarg_t) tid);111 rc = __SYSCALL4(SYS_THREAD_CREATE, (sysarg_t) uarg, (sysarg_t) name, 112 (sysarg_t) strlen(name), (sysarg_t) tid); 113 113 114 114 if (rc) {
Note:
See TracChangeset
for help on using the changeset viewer.