Loading...
Searching...
No Matches
rwlock.h
Go to the documentation of this file.
/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
* Copyright (C) 2008-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
*
* StarPU is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
*
* StarPU is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU Lesser General Public License in COPYING.LGPL for more details.
*/
#ifndef __RWLOCKS_H__
#define __RWLOCKS_H__
#include <stdint.h>
#include <starpu.h>
struct _starpu_rw_lock
{
uint32_t busy;
uint8_t writer;
uint16_t readercnt;
};
void _starpu_init_rw_lock(struct _starpu_rw_lock *lock);
void _starpu_take_rw_lock_write(struct _starpu_rw_lock *lock);
void _starpu_take_rw_lock_read(struct _starpu_rw_lock *lock);
int _starpu_take_rw_lock_write_try(struct _starpu_rw_lock *lock);
int _starpu_take_rw_lock_read_try(struct _starpu_rw_lock *lock);
void _starpu_release_rw_lock(struct _starpu_rw_lock *lock);
#endif
_starpu_take_rw_lock_read
void _starpu_take_rw_lock_read(struct _starpu_rw_lock *lock)
_starpu_take_rw_lock_read_try
int _starpu_take_rw_lock_read_try(struct _starpu_rw_lock *lock)
_starpu_release_rw_lock
void _starpu_release_rw_lock(struct _starpu_rw_lock *lock)
_starpu_init_rw_lock
void _starpu_init_rw_lock(struct _starpu_rw_lock *lock)
_starpu_take_rw_lock_write
void _starpu_take_rw_lock_write(struct _starpu_rw_lock *lock)
_starpu_take_rw_lock_write_try
int _starpu_take_rw_lock_write_try(struct _starpu_rw_lock *lock)
_starpu_rw_lock
Definition rwlock.h:27