Permalink
Browse files

pthread_at_fork: bogus implementation

Because we do not support fork, there is no need to do anything upon fork (and if
it changes in the future, we should revisit this)

So we can get away with this simple implementation that just returns 0.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
  • Loading branch information...
glommer committed Apr 8, 2014
1 parent f36d39a commit 73bd131f4dadcd758d87ee83325746ae6900838d
Showing with 19 additions and 3 deletions.
  1. +19 −3 libc/pthread.cc
View
@@ -180,9 +180,25 @@ int pthread_key_create(pthread_key_t* key, void (*dtor)(void*))
return 0;
}
extern "C"
int __pthread_key_create(pthread_key_t* key, void (*dtor)(void*))
__attribute__((alias("pthread_key_create")));
int pthread_atfork(void (*prepare)(void), void (*parent)(void),
void (*child)(void))
{
return 0;
}
extern "C" int register_atfork(void (*prepare)(void), void (*parent)(void),
void (*child)(void), void *__dso_handle)
{
return 0;
}
extern "C" {
int __register_atfork(void (*prepare)(void), void (*parent)(void),
void (*child)(void), void *__dso_handle) __attribute__((alias("register_atfork")));
int __pthread_key_create(pthread_key_t* key, void (*dtor)(void*))
__attribute__((alias("pthread_key_create")));
}
int pthread_key_delete(pthread_key_t key)
{

1 comment on commit 73bd131

@MannySchneck

This comment has been minimized.

Show comment
Hide comment

...

Please sign in to comment.