Why do I receive a segmentation violation when using a critical section in a structure to interface with MATLAB 7.3 (R2006b)?
1 view (last 30 days)
Show older comments
I use a structure to pass values and interact between MATLAB and C with a critical section in it. I receive a crash whenever I try to pass the critical section to MATLAB through a structure.
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
The ability to pass a critical section as argument in a structure is not available in MATLAB.
When passing structures that include critical sections, Microsoft's compiler provides debug information and redefines the structure. MATLAB, however, uses the LCC compiler, which does not have the same definition of critical secton.
You may be able to pass the pointer (void *) of the critical section. MATLAB can then pass the pointer back to other functions.
If you want to retrieve some information through the pointer, you need to write GET and SET functions that accept pointers as handles to retrieve specific information from the structure.
0 Comments
More Answers (0)
See Also
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!