Skip to content

Commit bd64551

Browse files
committed
fbdocs: update examples/manual 2021.04.16
1 parent 404dbf5 commit bd64551

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

examples/manual/defines/fbx64.bas

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
'' examples/manual/defines/fbx64.bas
2+
''
3+
'' NOTICE: This file is part of the FreeBASIC Compiler package and can't
4+
'' be included in other distributions without authorization.
5+
''
6+
'' See Also: https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgDdfbx86
7+
'' --------
8+
9+
#ifdef __FB_X86__
10+
'...instructions for X86 OSes...
11+
#else
12+
'...instructions for other OSes
13+
#endif

examples/manual/proguide/multithreading/criticalsectionfaq13-4.bas

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,20 +125,20 @@ End Destructor
125125

126126
Type ThreadDispatching
127127
Public:
128-
Declare Constructor(ByVal nbSecondaryThread As Integer = 1)
128+
Declare Constructor(ByVal nbMaxSecondaryThread As Integer = 1)
129129
Declare Sub DispatchingSubmit(ByVal pThread As Function(ByVal As Any Ptr) As String, ByVal p As Any Ptr = 0)
130130
Declare Sub DispatchingWait()
131131
Declare Sub DispatchingWait(values() As String)
132132
Declare Property DispatchingThread() As Integer
133133
Declare Destructor()
134134
Private:
135-
Dim As Integer _nbst
136-
Dim As Integer _dtnb
135+
Dim As Integer _nbmst
136+
Dim As Integer _dstnb
137137
Dim As ThreadPooling Ptr _tp(Any)
138138
End Type
139139

140-
Constructor ThreadDispatching(ByVal nbSecondaryThread As Integer = 1)
141-
This._nbst = nbSecondaryThread
140+
Constructor ThreadDispatching(ByVal nbMaxSecondaryThread As Integer = 1)
141+
This._nbmst = nbMaxSecondaryThread
142142
End Constructor
143143

144144
Sub ThreadDispatching.DispatchingSubmit(ByVal pThread As Function(ByVal As Any Ptr) As String, ByVal p As Any Ptr = 0)
@@ -148,13 +148,13 @@ Sub ThreadDispatching.DispatchingSubmit(ByVal pThread As Function(ByVal As Any P
148148
Exit Sub
149149
End If
150150
Next I
151-
If UBound(This._tp) < This._nbst - 1 Then
151+
If UBound(This._tp) < This._nbmst - 1 Then
152152
ReDim Preserve This._tp(UBound(This._tp) + 1)
153153
This._tp(UBound(This._tp)) = New ThreadPooling
154154
This._tp(UBound(This._tp))->PoolingSubmit(pThread, p)
155155
ElseIf UBound(This._tp) >= 0 Then
156-
This._tp(This._dtnb)->PoolingSubmit(pThread, p)
157-
This._dtnb = (This._dtnb + 1) Mod This._nbst
156+
This._tp(This._dstnb)->PoolingSubmit(pThread, p)
157+
This._dstnb = (This._dstnb + 1) Mod This._nbmst
158158
End If
159159
End Sub
160160

0 commit comments

Comments
 (0)