Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2001-01

criticalsection

8 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Aleksey V. Vaneev

Hello,

Is it possible to implement some portable criticalsection support? Under go32v2 it will be some global LockCount var. If entering critical section, it will be incremented and "cli" issued. If leaving, it will be decremented and if it's zero, "sti" issued.

Under other systems it supported natively I suppose.

So, there's only wrapper needed. I can provide it, but there's need in support for other platforms.

Best regards,
Aleksey

Unknown author
to Aleksey V. Vaneev
Aleksey V. Vaneev wrote 11 lines
Hello, Is it possible to implement some portable criticalsection support? Under go32v2 it will be some global LockCount var. If entering critical section, it will be incremented and "cli" issued. If leaving, it will be decremented and if it's zero, "sti" issued. Under other systems it supported natively I suppose. So, there's only wrapper needed. I can provide it, but there's need in support for other platforms.

Currently, we're adding support for Threads and CriticalSection to the development branch. But for go32 this doesn't make much sense since it doesn't know threads.

Michael.

Aleksey V. Vaneev

Hello,

Show quoted text 5 lines
Currently, we're adding support for Threads and CriticalSection to the development branch. But for go32 this doesn't make much sense since it doesn't know threads. Michael.

Yes, it doesn't, but please do include it for go32. Cli and sti is used to perform such tasks, but it's better to use same critical section mechanism under go32 as under other systems (it will allow more seamless porting). What is needed under go32 is lock_data() for dummy TCriticalSection var in begincriticalsection and increment of internal (locked) count variable.

Best regards,
Aleksey

Unknown author
to Michail A.Baikov
Michail A.Baikov wrote
TInterface planned to develop?

What is TInterface ?
If you mean Delphi interface support, then it is
already implemented in the main branch.

Michael.

Florian Klaempfl
to Aleksey V. Vaneev: Yes, it doesn't, but please do include it for go32. Cli and sti is used to perform such…
you wrote 15 lines
Hello, >Currently, we're adding support for Threads and CriticalSection to >the development branch. But for go32 this doesn't make much sense >since it doesn't know threads. > >Michael. Yes, it doesn't, but please do include it for go32. Cli and sti is used to perform such tasks, but it's better to use same critical section mechanism under go32 as under other systems (it will allow more seamless porting). What is needed under go32 is lock_data() for dummy TCriticalSection var in begincriticalsection and increment of internal (locked) count variable.

I tried already to port some thread library from djgpp to fpc but it didn't work :(

Aleksey V. Vaneev

Hello,

I tried already to port some thread library from djgpp to fpc but it didn't work :(

Guess, it's a timer problem... I haven't solved it so far...

Best regards,
Aleksey