Click here to Skip to main content
15,915,160 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
JokeRe: Have anybody catch errors of CrystalCtrl ? Pin
mesajflaviu10-May-10 4:51
mesajflaviu10-May-10 4:51 
GeneralRe: Have anybody catch errors of CrystalCtrl ? Pin
David Crow10-May-10 4:55
David Crow10-May-10 4:55 
GeneralRe: Have anybody catch errors of CrystalCtrl ? Pin
mesajflaviu10-May-10 6:29
mesajflaviu10-May-10 6:29 
GeneralRe: Have anybody catch errors of CrystalCtrl ? Pin
David Crow10-May-10 6:37
David Crow10-May-10 6:37 
Questionread/write function working in linux Pin
rupeshkp72810-May-10 0:56
rupeshkp72810-May-10 0:56 
AnswerRe: read/write function working in linux Pin
Michel Godfroid10-May-10 1:18
Michel Godfroid10-May-10 1:18 
GeneralRe: read/write function working in linux Pin
rupeshkp72810-May-10 1:56
rupeshkp72810-May-10 1:56 
AnswerRe: read/write function working in linux Pin
Randor 10-May-10 6:13
professional Randor 10-May-10 6:13 
Hi,

All modern operating systems in protected mode [^]work nearly the same when executing privileged instructions. They all pass through a call gate[^] and allow the kernel to do the system call[^]. The modern system call instructions are SYSENTER/SYSEXIT. In the old days it was interrupt 0x2e in Windows and 0x80 in Linux.

Here is an example of a Win32 function which is written with both 0x2e and SYSENTER syntax.

http://www.codeproject.com/Messages/2468550/Re-Send-Key-Input.aspx[^]

To answer your question I would summarize as follows:

1.) Glibc simply pushes your arguments onto the stack and invokes the sysenter instruction. (An older version of Linux will invoke interrupt 0x80)

2.) When the CPU sees the SYSENTER instruction it will JMP to the address listed in the registered SYSCALL table. It will execute the instructions there. (Here is where permissions and actual I/O is performed)

Best Wishes,
-David Delaune
GeneralRe: read/write function working in linux Pin
Moak10-May-10 10:26
Moak10-May-10 10:26 
GeneralRe: read/write function working in linux Pin
rupeshkp72812-May-10 1:59
rupeshkp72812-May-10 1:59 
QuestionVirtual function in DLL Pin
john56329-May-10 23:17
john56329-May-10 23:17 
AnswerRe: Virtual function in DLL Pin
CPallini10-May-10 0:44
mveCPallini10-May-10 0:44 
GeneralRe: Virtual function in DLL Pin
john563210-May-10 1:47
john563210-May-10 1:47 
GeneralRe: Virtual function in DLL Pin
john563210-May-10 2:48
john563210-May-10 2:48 
GeneralRe: Virtual function in DLL Pin
CPallini10-May-10 2:59
mveCPallini10-May-10 2:59 
GeneralRe: Virtual function in DLL Pin
john563210-May-10 3:17
john563210-May-10 3:17 
GeneralRe: Virtual function in DLL Pin
CPallini10-May-10 3:22
mveCPallini10-May-10 3:22 
GeneralRe: Virtual function in DLL Pin
john563210-May-10 3:36
john563210-May-10 3:36 
GeneralRe: Virtual function in DLL Pin
Richard MacCutchan10-May-10 3:49
mveRichard MacCutchan10-May-10 3:49 
GeneralRe: Virtual function in DLL Pin
CPallini10-May-10 4:03
mveCPallini10-May-10 4:03 
GeneralRe: Virtual function in DLL Pin
john563210-May-10 3:45
john563210-May-10 3:45 
GeneralRe: Virtual function in DLL Pin
Cedric Moonen10-May-10 3:57
Cedric Moonen10-May-10 3:57 
GeneralRe: Virtual function in DLL Pin
john563210-May-10 4:18
john563210-May-10 4:18 
GeneralRe: Virtual function in DLL Pin
Cedric Moonen10-May-10 4:31
Cedric Moonen10-May-10 4:31 
GeneralRe: Virtual function in DLL Pin
john563210-May-10 5:52
john563210-May-10 5:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.