Subversion Repositories HelenOS

Rev

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

Rev 4344 Rev 4345
Line 50... Line 50...
50
#include <ipc/ipc.h>
50
#include <ipc/ipc.h>
51
#include <ipc/ipcrsc.h>
51
#include <ipc/ipcrsc.h>
52
#include <print.h>
52
#include <print.h>
53
#include <errno.h>
53
#include <errno.h>
54
#include <func.h>
54
#include <func.h>
-
 
55
#include <string.h>
55
#include <syscall/copy.h>
56
#include <syscall/copy.h>
56
 
57
 
57
/** Spinlock protecting the tasks_tree AVL tree. */
58
/** Spinlock protecting the tasks_tree AVL tree. */
58
SPINLOCK_INITIALIZE(tasks_lock);
59
SPINLOCK_INITIALIZE(tasks_lock);
59
 
60
 
Line 271... Line 272...
271
    rc = copy_from_uspace(namebuf, uspace_name, name_len);
272
    rc = copy_from_uspace(namebuf, uspace_name, name_len);
272
    if (rc != 0)
273
    if (rc != 0)
273
        return (unative_t) rc;
274
        return (unative_t) rc;
274
 
275
 
275
    namebuf[name_len] = '\0';
276
    namebuf[name_len] = '\0';
276
    strcpy(TASK->name, namebuf);
277
    strncpy(TASK->name, namebuf, TASK_NAME_BUFLEN);
277
 
278
 
278
    return EOK;
279
    return EOK;
279
}
280
}
280
 
281
 
281
/** Find task structure corresponding to task ID.
282
/** Find task structure corresponding to task ID.