XenevaOS
Loading...
Searching...
No Matches
Functions
pthread.cpp File Reference
#include <pthread.h>
#include <sys/_keproc.h>
#include <stdint.h>
Include dependency graph for pthread.cpp:

Functions

void _PthreadSetParam (uint64_t val)
 
int pthread_create (pthread_t *thread, pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
 
void pthread_exit (void *val)
 
int pthread_kill (pthread_t *thread, int sig)
 
int gettid ()
 
int pthread_join (pthread_t thread, void **retval)
 
void pthread_cleanup_push (void(*routine)(void *), void *arg)
 
void pthread_cleanup_pop (int execute)
 
int pthread_mutex_lock (pthread_mutex_t *mutex)
 
int pthread_mutex_trylock (pthread_mutex_t *mutex)
 
int pthread_mutex_unlock (pthread_mutex_t *mutex)
 
int pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
 
int pthread_mutex_destroy (pthread_mutex_t *mutex)
 
int pthread_attr_init (pthread_attr_t *attr)
 
int pthread_attr_destroy (pthread_attr_t *attr)
 
int pthread_rwlock_init (pthread_rwlock_t *lock, void *args)
 
int pthread_rwlock_wrlock (pthread_rwlock_t *lock)
 
int pthread_rwlock_rdlock (pthread_rwlock_t *lock)
 
int pthread_rwlock_unlock (pthread_rwlock_t *lock)
 
int pthread_rwlock_destroy (pthread_rwlock_t *lock)
 

Function Documentation

◆ _PthreadSetParam()

void _PthreadSetParam ( uint64_t  val)

BSD 2-Clause License

Copyright (c) 2022-2026, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ gettid()

int gettid ( )

◆ pthread_attr_destroy()

int pthread_attr_destroy ( pthread_attr_t *  attr)

◆ pthread_attr_init()

int pthread_attr_init ( pthread_attr_t *  attr)

◆ pthread_cleanup_pop()

void pthread_cleanup_pop ( int  execute)

◆ pthread_cleanup_push()

void pthread_cleanup_push ( void(*)(void *)  routine,
void *  arg 
)

◆ pthread_create()

int pthread_create ( pthread_t *  thread,
pthread_attr_t *  attr,
void *(*)(void *)  start_routine,
void *  arg 
)

TODO: Kernel doesn't have error check on thread creation whether it succeed or failed, so it gurantees for success in thread creation so no error returning is branched :)

◆ pthread_exit()

void pthread_exit ( void *  val)

◆ pthread_join()

int pthread_join ( pthread_t  thread,
void **  retval 
)

◆ pthread_kill()

int pthread_kill ( pthread_t *  thread,
int  sig 
)

◆ pthread_mutex_destroy()

int pthread_mutex_destroy ( pthread_mutex_t *  mutex)

◆ pthread_mutex_init()

int pthread_mutex_init ( pthread_mutex_t *  mutex,
const pthread_mutexattr_t *  attr 
)

◆ pthread_mutex_lock()

int pthread_mutex_lock ( pthread_mutex_t *  mutex)

◆ pthread_mutex_trylock()

int pthread_mutex_trylock ( pthread_mutex_t *  mutex)

◆ pthread_mutex_unlock()

int pthread_mutex_unlock ( pthread_mutex_t *  mutex)

◆ pthread_rwlock_destroy()

int pthread_rwlock_destroy ( pthread_rwlock_t *  lock)

◆ pthread_rwlock_init()

int pthread_rwlock_init ( pthread_rwlock_t *  lock,
void *  args 
)

◆ pthread_rwlock_rdlock()

int pthread_rwlock_rdlock ( pthread_rwlock_t *  lock)

◆ pthread_rwlock_unlock()

int pthread_rwlock_unlock ( pthread_rwlock_t *  lock)

◆ pthread_rwlock_wrlock()

int pthread_rwlock_wrlock ( pthread_rwlock_t *  lock)