File: tsld024.htm

package info (click to toggle)
aolserver4 4.5.1-15.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 11,772 kB
  • sloc: ansic: 45,120; tcl: 5,532; sh: 1,021; makefile: 380; pascal: 219; php: 13
file content (50 lines) | stat: -rw-r--r-- 1,063 bytes parent folder | download | duplicates (8)
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

<HTML>

<HEAD>

<meta name="GENERATOR" content="Microsoft Internet Assistant for PowerPoint 97">
 <TITLE>Multithreaded Tcl - Mutex Protection</TITLE> 
</HEAD>

<BODY     >

 <H1>Multithreaded Tcl - Mutex Protection</H1> 
 <P><UL>
<LI><H2>First, various shared data had to be protected with mutexes, e.g., from tclUtil.c:</H2>
</UL></P>
<P><UL>
void
</UL><UL>
Tcl_PrintDouble(interp, value, dst)
</UL><UL>
{
</UL><UL>
    char *p, c;
</UL><UL>
    Tcl_UniChar ch;
</UL><UL>

</UL><UL>
    Tcl_MutexLock(&precisionMutex);
</UL><UL>
    sprintf(dst, precisionFormat, value);
</UL><UL>
    Tcl_MutexUnlock(&precisionMutex);
</UL><UL>
    ...</UL></P>
<P></P> 
<P>
<TABLE>
  <TD HEIGHT=100 WIDTH=100> <A HREF="tsld023.htm">Previous slide</A> </TD>
  <TD HEIGHT=100 WIDTH=100> <A HREF="tsld025.htm">Next slide</A> </TD>
  <TD HEIGHT=100 WIDTH=150> <A HREF="tsld001.htm">Back to first slide</A> </TD>
  <TD HEIGHT=100 WIDTH=150> <A HREF="sld024.htm">View graphic version</A> </TD>
</TABLE>
<BR>
</P>



</Body>
</HTML>