mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-05 00:41:19 -05:00
9e73f87218
MAP65 v2.3.0, r631, as checked out from the SVN repository on pulsar.princeton.edu. If all goes well with this commit, subsequent MAP65 development will use the Berlios repository. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@2461 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
35 lines
919 B
C++
35 lines
919 B
C++
#include <QDebug>
|
|
#include <qsharedmemory.h>
|
|
#include <QSystemSemaphore>
|
|
|
|
QSharedMemory mem_m65("mem_m65");
|
|
QSystemSemaphore sem_m65("sem_m65", 1, QSystemSemaphore::Open);
|
|
|
|
extern "C" {
|
|
bool attach_m65_();
|
|
bool create_m65_(int nsize);
|
|
bool detach_m65_();
|
|
bool lock_m65_();
|
|
bool unlock_m65_();
|
|
char* address_m65_();
|
|
int size_m65_();
|
|
|
|
bool acquire_m65_();
|
|
bool release_m65_();
|
|
|
|
extern struct {
|
|
char c[10];
|
|
} m65com_;
|
|
}
|
|
|
|
bool attach_m65_() {return mem_m65.attach();}
|
|
bool create_m65_(int nsize) {return mem_m65.create(nsize);}
|
|
bool detach_m65_() {return mem_m65.detach();}
|
|
bool lock_m65_() {return mem_m65.lock();}
|
|
bool unlock_m65_() {return mem_m65.unlock();}
|
|
char* address_m65_() {return (char*)mem_m65.constData();}
|
|
int size_m65_() {return (int)mem_m65.size();}
|
|
|
|
bool acquire_m65_() {return sem_m65.acquire();}
|
|
bool release_m65_() {return sem_m65.release();}
|