tis_write_lock(3) Library Functions Manual tis_write_lock(3)NAME
tis_write_lock - Acquires the specified read-write lock for write access.
LIBRARY
Standard C Library (libc.so, libc.a)
SYNOPSIS
#include <tis.h>
int tis_write_lock(
tis_rwlock_t *lock);
STANDARDS
None
PARAMETERS
Address of the read-write lock to be acquired for write access.
DESCRIPTION
This routine acquires a read-write lock for write access. This routine waits for any other active locks (for either read or write access)
to be unlocked before this acquisition request is granted.
This routine returns when the specified read-write lock is acquired for write access.
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 lock is not a valid read-write lock.
ERRORS
None
RELATED INFORMATION
Functions: tis_read_lock(3), tis_read_trylock(3), tis_read_unlock(3), tis_rwlock_destroy(3), tis_rwlock_init(3), tis_write_trylock(3),
tis_write_unlock(3)
Manuals: Guide to DECthreads and Programmer's Guide delim off
tis_write_lock(3)
Check Out this Related Man Page
tis_read_trylock(3) Library Functions Manual tis_read_trylock(3)NAME
tis_read_trylock - Attempts to acquire a read-write lock for read access. Does not wait if the lock cannot be immediately granted.
LIBRARY
Standard C Library (libc.so, libc.a)
SYNOPSIS
#include <tis.h>
int tis_read_trylock(
tis_rwlock_t *lock);
STANDARDS
None
PARAMETERS
Address of the read-write lock to be acquired.
DESCRIPTION
This routine attempts to acquire a read-write lock for read access. If the lock cannot be granted, the routine returns without waiting.
When a thread calls this routine, an attempt is made to immediately acquire the lock for read access. If the lock is acquired, zero (0) is
returned. If a holder of the lock for write access exists, [EBUSY] is returned.
If the lock cannot be acquired for read access immediately, the calling program does not wait for the lock to be released.
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 lock was acquired. The lock is being held for write access. The lock for read access was not acquired.
ERRORS
None
RELATED INFORMATION
Functions: tis_read_lock(3), tis_read_unlock(3), tis_rwlock_destroy(3), tis_rwlock_init(3), tis_write_lock(3), tis_write_trylock(3),
tis_write_unlock(3)
Manuals: Guide to DECthreads and Programmer's Guide delim off
tis_read_trylock(3)
hi guys, I'have a question 4 u.
Why this code give me the right output (an integer on the stdout):
read(fd,&mpid,sizeof(pid_t));
printf("%d\n",mpid);
Instead this code give me only a blank line:
read(fd,&mpid,sizeof(pid_t));
write(STDOUT_FILENO,&mpid,sizeof(pid_t));
... (2 Replies)
Hi,
is it possible to write files via write() to a socket and read it on the other side via read(), without going through buffers? Iif not via write() and read() are there other possibilities?
thanks
darkspace (5 Replies)
Basically i am not looking for you guys to write the script for me but help me understand how to write it and point me in the write direction.
I can see what i want to do, just having trouble putting it into shell.
I have a file Blah.txt with 400 DN's in it. I need to modify two attributes... (1 Reply)
is there a way to "lock" an entire directory to where it currently resides for securtiy purposes? only certain users can access these data, however i want to prevent the possibility of transferring/duplicating the data to where other unauthorized users can access it. Any one who knows a good... (4 Replies)
I'm trying to write an integer to a file using the write() function, but write() requires the parameter to be written to be a const void*.
How would I go about doing this?
also: using itoa() produces a " warning: implicit declaration of function 'itoa' " even though i have #included stdlib.h (2 Replies)
Hello
Could u tell me how to read an integer froma file?
i have already written a C code to write an integer to a file,
but i'm doubt how to write code to read an integer (3 Replies)
Ok, so I'm trying to finalize my understanding of read/write and kernel interaction.
read():
You have a library function that has as it's first parameter (what the open file to read from is), second parameter( a pointer to a buffer (is this the location of a buffer in the user area or the... (1 Reply)
I am out of idea what to do to resolve the problem!
I need to use the open(file, for.., access) function to write a file.
Never have the situation like that: it is return 0 - zero.
As a result all write(..) going to the screen!
What the problem it could be?
I do not even know... (2 Replies)
Hi, I would like to read the specific data from file and write the data in the new file.
My data input is something like this..
<EXROP:R=TJ0311T;
ROUTE DATA
R ROUTE PARAMETERS
TJ0311T DETY=UPDR TTRANS=1 FNC=3
MA=628160955000
R=TJ0311D
... (3 Replies)
Hey everybody.
How do you write a program that will produce output based on its arguments?
For example, how would you write one that will add 1 to an integer argument so it would look like this:
$add 1 78
79
$
I only know how to write programs to take user input with the read function,... (2 Replies)
To read/write to a DB from Java or Perl, you usually have to install/reference several drivers and write a whole bunch of boilerplate DB access code.
I'm curious if someone has written a command line utility for Unix/Linux for simple database access for the major providers, something like:
... (3 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
My problem is that when creating my producers and consumers, if I don't create an equal number of both, the... (12 Replies)
Can someone help me to write this program in C in QNX?
Using the FIFO queues write a simple communication system consisting of programs write and read. The program write the parameters given strings enclosed in single quotes. These strings are written to the FIFO file. Reads the program read... (1 Reply)
Hi,
I am trying to do a write operation followed by a read operation on the same file through Perl, expecting the output produced by read to contain the new lines added, as follows:
#! /usr/bin/perl -w
open FH, "+< testfile" or die "$@";
print FH "New content added\n";
while (my $line =... (1 Reply)
Hi All,
I need the answer of below question?
1) How to write multiple cronjobs in shellscript? Is there any way or we cant write in shellscript...
Regards,
Priyanka (2 Replies)