Clean up forking and cloning.

The kernel now maintains the pthread_internal_t::tid field for us,
and __clone was only used in one place so let's inline it so we don't
have to leave such a dangerous function lying around. Also rename
files to match their content and remove some useless #includes.

Change-Id: I24299fb4a940e394de75f864ee36fdabbd9438f9
This commit is contained in:
Elliott Hughes
2013-11-19 13:31:58 -08:00
parent 318e86ed88
commit 36d6188f8c
26 changed files with 44 additions and 172 deletions

View File

@@ -73,14 +73,6 @@ pid_t __pthread_gettid(pthread_t t) {
return reinterpret_cast<pthread_internal_t*>(t)->tid;
}
int __pthread_settid(pthread_t t, pid_t tid) {
if (t == 0) {
return EINVAL;
}
reinterpret_cast<pthread_internal_t*>(t)->tid = tid;
return 0;
}
// Initialize 'ts' with the difference between 'abstime' and the current time
// according to 'clock'. Returns -1 if abstime already expired, or 0 otherwise.
int __timespec_to_absolute(timespec* ts, const timespec* abstime, clockid_t clock) {