File: qlock.3qt

package info (click to toggle)
qt-embedded-free 3.0.3-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 91,492 kB
  • ctags: 67,431
  • sloc: cpp: 427,709; ansic: 128,011; sh: 21,353; yacc: 2,874; xml: 2,310; python: 1,863; perl: 481; lex: 453; makefile: 426; sql: 29; lisp: 15
file content (88 lines) | stat: -rw-r--r-- 3,529 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
'\" t
.TH QLock 3qt "18 March 2002" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
QLock \- Wrapper round a System V shared semaphore
.SH SYNOPSIS
\fC#include <qlock_qws.h>\fR
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBQLock\fR ( const QString & filename, char id, bool create = FALSE )"
.br
.ti -1c
.BI "\fB~QLock\fR ()"
.br
.ti -1c
.BI "enum \fBType\fR { Read, Write }"
.br
.ti -1c
.BI "bool \fBisValid\fR () const"
.br
.ti -1c
.BI "void \fBlock\fR ( Type t )"
.br
.ti -1c
.BI "void \fBunlock\fR ()"
.br
.ti -1c
.BI "bool \fBlocked\fR () const"
.br
.in -1c
.SH DESCRIPTION
The QLock class is a wrapper round a System V shared semaphore.
.PP
It is used by Qt/Embedded for synchronizing access to the graphics card and shared memory region between processes.
.PP
See also Input/Output and Networking and Qt/Embedded.
.SS "Member Type Documentation"
.SH "QLock::Type"
.TP
\fCQLock::Read\fR
.TP
\fCQLock::Write\fR
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QLock::QLock ( const QString & filename, char id, bool create = FALSE )"
Creates a lock. \fIfilename\fR is the file path of the Unix-domain socket the Qt/Embedded client is using. \fIid\fR is the name of the particular lock to be created on that socket. If \fIcreate\fR is TRUE the lock is to be created (as the Qt/Embedded server does); if \fIcreate\fR is FALSE the lock should exist already (as the Qt/Embedded client expects).
.SH "QLock::~QLock ()"
Destroys a lock
.SH "bool QLock::isValid () const"
Returns TRUE if the lock constructor was succesful; returns FALSE if the lock could not be created or was not available to connect to.
.SH "void QLock::lock ( Type t )"
Locks the semaphore with a lock of type \fIt\fR. Locks can either be Read or Write. If a lock is Read, attempts to lock by other processes as Read will succeed, Write attempts will block until the lock is unlocked. If locked as Write, all attempts to lock by other processes will block until the lock is unlocked. Locks are stacked: i.e. a given QLock can be locked multiple times by the same process without blocking, and will only be unlocked after a corresponding number of unlock() calls.
.SH "bool QLock::locked () const"
Returns TRUE if the lock is currently held by the current process; otherwise returns FALSE.
.SH "void QLock::unlock ()"
Unlocks the semaphore. If other processes were blocking waiting to lock()
the semaphore, one of them will wake up and succeed in lock()ing.

.SH "SEE ALSO"
.BR http://doc.trolltech.com/qlock.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive Qt documentation is provided in HTML format; it is
located at $QTDIR/doc/html and can be read using Qt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech. 
.P
If you find errors in this manual page, please report them to
.BR qt-bugs@trolltech.com .
Please include the name of the manual page (qlock.3qt) and the Qt
version (3.0.3).