tis_mutex_trylock(3) Library Functions Manual tis_mutex_trylock(3)NAME
tis_mutex_trylock - Attempts to lock the specified mutex.
LIBRARY
Standard C Library (libc.so, libc.a)
SYNOPSIS
#include <tis.h>
int tis_mutex_trylock(
pthread_mutex_t *mutex);
STANDARDS
None
PARAMETERS
Address of the mutex (passed by reference) to be locked.
DESCRIPTION
This routine attempts to lock the specified mutex mutex. When this routine is called, an attempt is made immediately to lock the mutex.
If the mutex is successfully locked, zero (0) is returned.
If the specified mutex is already locked when this routine is called, the caller does not wait for the mutex to become available. [EBUSY]
is returned, and the thread does not wait to acquire the lock.
RETURN VALUES
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows:
Successful completion. The mutex is already locked; therefore, it was not acquired. The value specified by mutex is invalid.
ERRORS
None
RELATED INFORMATION
Functions: tis_mutex_destroy(3), tis_mutex_init(3), tis_mutex_lock(3), tis_mutex_unlock(3)
Manuals: Guide to DECthreads and Programmer's Guide
delim off
tis_mutex_trylock(3)
Check Out this Related Man Page
tis_mutex_unlock(3) Library Functions Manual tis_mutex_unlock(3)NAME
tis_mutex_unlock - Unlocks the specified mutex.
LIBRARY
Standard C Library (libc.so, libc.a)
SYNOPSIS
#include <tis.h>
int tis_mutex_unlock(
pthread_mutex_t *mutex);
STANDARDS
None
PARAMETERS
Address of the mutex (passed by reference) to be unlocked.
DESCRIPTION
This routine unlocks the specified mutex mutex.
For more information about actions taken when threads are present, refer to the pthread_mutex_unlock description.
RETURN VALUES
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows:
Successful completion. The value specified by mutex is invalid. The caller does not own the mutex.
ERRORS
None
RELATED INFORMATION
Functions: tis_mutex_destroy(3), tis_mutex_init(3), tis_mutex_lock(3), tis_mutex_trylock(3)
Manuals: Guide to DECthreads and Programmer's Guide
delim off
tis_mutex_unlock(3)
Hi,
I want to do the foll steps:
1. Check if someone has a lock on my file1.
2. if file1 is locked by any other user
wait in a loop till another user releases lock
3. when lock released, lock file1.
4. do procesing (write) on file1.
5. processing complete. release lock on file1.
... (2 Replies)
I have some locked files ( locked via the Mac finder)
I have tired rm -R and rm -rdf but it doesnt delete the locked files
just says "override rw------- etc?"
type "yes" and says "operation not permitted"
is there some way to do this (or unlock the files)
Thanks (1 Reply)
Hi, I have two tasks 'Read' and 'Write' which reads and writes on a file "abc.txt" respectively.
Now I need to restrict the Write operation on the file while Read is going on, But can allow two Reads at a time.
ie. two Reads can happen simultaneously, but Write can't happen at Read is going on.
... (3 Replies)
Hi Everyone
I have this quite simple "tread" function
void* row_calc(void *input)
{
struct thread_arg* th_arg;
th_arg=(struct thread_arg *) input;
int start,width,end,seg,k,l,tmp;
start=th_arg->start;
width=th_arg->width;
end=start+width-1;
seg=th_arg->seg;
... (2 Replies)
Hi,
How to list the files which are not locked?
I want to read the files that are not locked by other user only.
can we do it using ls option? (5 Replies)
Hi everyone,
I have got a requirement that, i need to check a specific folder,say /test/lock/ for few specific files, say *lock*, whether it has been locked or not.If any one of it is locked than i need to delete that file after a specific time, say after 10 minutes.
I never have worked on... (4 Replies)
Hi all,
I have a scenario where I need to use the mutex locks. The mutex locks are working fine, but sometimes I am getting into the dead lock situation.
Below is the summary of my code :
MUTEX LOCK
performTask();
MUTEX UNLOCK.
In some cases I get into the situation where... (2 Replies)