summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorhershey <hershey>1999-04-16 22:53:43 (GMT)
committerhershey <hershey>1999-04-16 22:53:43 (GMT)
commitedef398a091868bf7168e0e350b5cb8010209f56 (patch)
tree3977126c2fc9f4c7d38da0d44d1c02a3f8b107b9 /doc
parentbc1186e23a8f0e592e97b8d8a72f81ac6e69b8c8 (diff)
downloadtcl-edef398a091868bf7168e0e350b5cb8010209f56.zip
tcl-edef398a091868bf7168e0e350b5cb8010209f56.tar.gz
tcl-edef398a091868bf7168e0e350b5cb8010209f56.tar.bz2
added Tcl_DStringTrunc to DString.3
added mention of Tcl_ThreadQueueEvent, Tcl_ThreadAlert to Notifier.3 added Tcl_ThreadQueueEvent, Tcl_ThreadAlert, and Tcl_GetCurrentThread to Thread.3
Diffstat (limited to 'doc')
-rw-r--r--doc/DString.38
-rw-r--r--doc/Notifier.320
-rw-r--r--doc/Thread.318
3 files changed, 40 insertions, 6 deletions
diff --git a/doc/DString.3 b/doc/DString.3
index e8cc5e1..e03f1f0 100644
--- a/doc/DString.3
+++ b/doc/DString.3
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: DString.3,v 1.2 1998/09/14 18:39:48 stanton Exp $
+'\" RCS: @(#) $Id: DString.3,v 1.3 1999/04/16 22:53:43 hershey Exp $
'\"
.so man.macros
.TH Tcl_DString 3 7.4 Tcl "Tcl Library Procedures"
@@ -36,6 +36,8 @@ char *
.sp
\fBTcl_DStringSetLength\fR(\fIdsPtr, newLength\fR)
.sp
+\fBTcl_DStringTrunc\fR(\fIdsPtr, newLength\fR)
+.sp
\fBTcl_DStringFree\fR(\fIdsPtr\fR)
.sp
\fBTcl_DStringResult\fR(\fIinterp, dsPtr\fR)
@@ -124,6 +126,10 @@ caller to fill in the new space.
even if the string is truncated to zero length, so \fBTcl_DStringFree\fR
will still need to be called.
.PP
+\fBTcl_DStringTrunc\fR changes the length of a dynamic string.
+This procedure is now deprecated. \fBTcl_DStringSetLength\fR should
+be used instead.
+.PP
\fBTcl_DStringFree\fR should be called when you're finished using
the string. It frees up any memory that was allocated for the string
and reinitializes the string's value to an empty string.
diff --git a/doc/Notifier.3 b/doc/Notifier.3
index dcd8250..c92b3cb 100644
--- a/doc/Notifier.3
+++ b/doc/Notifier.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Notifier.3,v 1.2 1998/09/14 18:39:49 stanton Exp $
+'\" RCS: @(#) $Id: Notifier.3,v 1.3 1999/04/16 22:53:43 hershey Exp $
'\"
.so man.macros
.TH Notifier 3 8.0 Tcl "Tcl Library Procedures"
@@ -24,6 +24,8 @@ Tcl_CreateEventSource, Tcl_DeleteEventSource, Tcl_SetMaxBlockTime, Tcl_QueueEven
\fBTcl_SetMaxBlockTime\fR(\fItimePtr\fB)\fR
.sp
\fBTcl_QueueEvent\fR(\fIevPtr, position\fR)
+.sp
+\fBTcl_ThreadQueueEvent\fR(\fIthreadId, evPtr, position\fR)
.VS
.sp
\fBTcl_DeleteEvents\fR(\fIdeleteProc, clientData\fR)
@@ -31,6 +33,15 @@ Tcl_CreateEventSource, Tcl_DeleteEventSource, Tcl_SetMaxBlockTime, Tcl_QueueEven
int
\fBTcl_WaitForEvent\fR(\fItimePtr\fR)
.sp
+ClientData
+\fBTcl_InitNotifier\fR()
+.sp
+\fBTcl_FinalizeNotifier\fR(\fIclientData\fR)
+.sp
+\fBTcl_AlertNotifier\fR(\fIclientData\fR)
+.sp
+\fBTcl_ThreadAlert\fR(\fIthreadId\fR)
+.sp
\fBTcl_SetTimer\fR(\fItimePtr\fR)
.sp
int
@@ -119,7 +130,9 @@ servicing at a future time.
\fBTcl_QueueEvent\fR is used (primarily
by event sources) to add events to the event queue and
\fBTcl_DeleteEvents\fR is used to remove events from the queue without
-processing them.
+processing them. See the manual entry for \fBThread\fR for a
+description of the \fBTcl_ThreadQueueEvent\fR procedure.
+
.IP [3]
The event loop: in order to detect and process events, the application
enters a loop that waits for events to occur, places them on the event
@@ -406,7 +419,8 @@ entry, plus \fBTcl_DoOneEvent\fR and \fBTcl_Sleep\fR, which are
available on all platforms, and \fBTcl_CreateFileHandler\fR and
\fBTcl_DeleteFileHandler\fR, which are Unix-specific. Most of these
procedures are generic, in that they are the same for all notifiers.
-However, five of the procedures are notifier-dependent:
+However, eight of the procedures are notifier-dependent:
+\fBTcl_InitNotifier\fR, \fBTcl_AlertNotifier\fR, \fBTcl_FinalizeNotifier\fR,
\fBTcl_SetTimer\fR, \fBTcl_Sleep\fR, \fBTcl_WaitForEvent\fR,
\fBTcl_CreateFileHandler\fR and \fBTcl_DeleteFileHandler\fR. To
support a new platform or to integrate Tcl with an
diff --git a/doc/Thread.3 b/doc/Thread.3
index 595fac3..733bb52 100644
--- a/doc/Thread.3
+++ b/doc/Thread.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: Thread.3,v 1.2 1999/04/16 00:46:33 stanton Exp $
+'\" RCS: @(#) $Id: Thread.3,v 1.3 1999/04/16 22:53:43 hershey Exp $
'\"
.so man.macros
.TH Tcl_ConditionNotify 3 "8.1" Tcl "Tcl Library Procedures"
@@ -21,6 +21,9 @@ void
void
\fBTcl_ConditionWait\fR(\fIcondPtr, mutexPtr, timePtr\fR)
.sp
+Tcl_ThreadId
+\fBTcl_GetCurrentThread\fR()
+.sp
VOID *
\fBTcl_GetThreadData\fR(\fIkeyPtr, size\fR)
.sp
@@ -29,6 +32,10 @@ void
.sp
void
\fBTcl_MutexUnlock\fR(\fImutexPtr\fR)
+.sp
+\fBTcl_ThreadAlert\fR(\fIthreadId\fR)
+.sp
+\fBTcl_ThreadQueueEvent\fR(\fIthreadId, evPtr, position\fR)
.SH ARGUMENTS
.AS Tcl_ThreadDataKey *keyPtr
.AP Tcl_Condition *condPtr in
@@ -77,11 +84,18 @@ The caller of \fBTcl_ConditionWait\fR should be prepared for spurious
notifications by calling \fBTcl_ConditionWait\fR within a while loop
that tests some invariant.
.PP
+The \fBTcl_GetCurrentThread\fR call returns the thread Id of the
+thread in which the call is made. The thread Id can be used in calls
+to \fBTcl_ThreadQueueEvent\fR and \fBTcl_ThreadAlert\fR. These
+procedures are essentially mutex-protected vesions of
+\fBTcl_AlertNotifier\fR and \fBTcl_QueueEvent\fR, respectively. See
+the manual entry for \fBNotifier\fR for more details.
+.PP
The \fBTcl_GetThreadData\fR call returns a pointer to a block of
thread-private data. Its argument is a key that is shared by all threads
and a size for the block of storage. The storage is automatically
allocated and initialized to all zeros the first time each thread asks for it.
-The storage is automatically deallocated by \fBTcl_FinalizeThread\fR
+The storage is automatically deallocated by \fBTcl_FinalizeThread\fR.
.SH INITIALIZATION
.PP
.PP