[[ header START ]]

Welcome to OS2.GURU site! (eComStation.RU)

Select your language: Russian English Deutch Spanish Italian Portuguese Czech Polish French

Frequently asked questions and answers:
telegram

Форум обсуждение

telegram

Send message

telegram

[ +7-981-8529467 (Санкт-Петербург)

telegram

t.me/os2_guru

eComStation.RU


ru · en · de · es · it · pt · cz · pl · fr
OS/2 is a greatly different operating system for PC (ArcaOS, eComStation, IBM OS/2 Warp)
Applications, news, reviews, support of users, hardware, questions and answers.
 
[What is OS/2?  News  Install  Update  
 
 
Usage  Future  Community  Projects  

How to buy
russian OS/2 apps?

The concept of
OS/2 development

(Map of the site)

 
 
[[ head-3-search ]]

Database of OS/2 compatible hardware

[[ head-3-search END ]]

 
Update

 
Applications

 
Advantages:

 
For developer:

 
(Пайпы программ)

 
Companies:

 
History:

 
(Бонусы)

 
Advice:

 
(Барьеры и решения)

 
Technologies:

 
(Применение в науке, лаборатории, ..)

 

 
Solutions

 
New eComStation:

 
Future:

 
(Ссылки на другие сайты)

 
(Картинка дня)

 
OS/2 artefacts:

 
Gadgets:

eCo Software Developer Connection


About DevCon
Subscription to DevCon
Budget of DevCon
FAQ


Roadmap
eCo Software runtime
eCo Software toolkit
Contacts

  You can sponsor the development of the libraries,
control the expenses

Development of SMP-safe applications and multi-thread applications are different things.

Start from reading SMP.INF
The SMP Programming Addendum is a detailed technical guide and reference for application programmers who which to exploit the symmetric multiprocessor support in the OS/2 operating system. It gives reference information and code examples to enable you to write source code using OS/2 functions and tools.

Useful articles

FAQ

Q1: What is the difference between _beginthread and DosCreatThread?
A1: _beginthread initializes the C runtime, DosCreatThread doesn't.

When using the _beginthread and _endthread functions, you must specify the /Gm+ compiler option to use the multithread libraries.

An alternative to this function is the OS/2 DosCreateThread API. If you use DosCreateThread, you must also use a #pragma handler statement for the thread function to ensure proper C exception handling. You should also call the _fpreset function at the start of the thread to preset the 387 control status word correctly. Using DosCreateThread requires that you use _endthread to terminate the thread.

Q2: How to create SMP-safe application?
A2: Don't write to one memory address from two threads simultaneously. It's safe to do this on PC with one CPU, it's critical if you have many CPUs. Use auxiliary lock functions to avoid the problems.

Q3: How to organize SMP-safe write to file?
A3: Instead of SpeenLock we recommend use other function:

    volatile int InStatusLine = 0;
    
    // Use __lxchg to implement fast-RAM semaphores to serialize access 
    // to a critical resource (so that only one thread can use it at a time). 
    while (__lxchg(&InStatusLine, 1))
    {
       DosSleep(1);
    }
    
    // write to file here
    
    
    // restore the value
    __lxchg(&InStatusLine, 0);

Q4: Maximal quantity of threads?
A4: eComStation kernel can't create more than 4096 threads.

 

 
For dummies

Database of OS/2 compatible hardware

 
Reviews


     
  Why eComStation?
Features
Advantages
Usage
Clips and screenshots
   eComStation for
for businessmen
for students and engineers
for reselles of computers
community of users
   Developer
Distribute the program
Description of API, libraries
Start new project
Competition
   Applications
On-line catalogue
Select from eCo Market
   Support service
Contact the web-master
Buy eComStation
Frequently asked questions
for Beginners
 
 
© 2001 - 2021 eCo Software, All rights reserved
Сибирский Медведь технологическая компания
eComStation Serenity Systems International • OS/2 Warp IBM Corporation • ArcaOS Arca Noae