Browse Source

John Emmas POST_PACKED_STRUCTURE patch.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4555 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.8
sletz 14 years ago
parent
commit
1e00bb3448
18 changed files with 72 additions and 9 deletions
  1. +4
    -0
      ChangeLog
  2. +1
    -0
      common/JackActivationCount.h
  3. +2
    -1
      common/JackAtomicArrayState.h
  4. +2
    -0
      common/JackAtomicState.h
  5. +1
    -0
      common/JackClientControl.h
  6. +6
    -0
      common/JackConnectionManager.h
  7. +1
    -0
      common/JackEngineControl.h
  8. +4
    -0
      common/JackEngineProfiling.h
  9. +4
    -1
      common/JackFilters.h
  10. +2
    -0
      common/JackFrameTimer.h
  11. +1
    -0
      common/JackGraphManager.h
  12. +1
    -0
      common/JackPort.h
  13. +1
    -0
      common/JackTransportEngine.h
  14. +6
    -1
      common/shm.h
  15. +3
    -1
      macosx/JackCompilerDeps_os.h
  16. +4
    -2
      posix/JackCompilerDeps_os.h
  17. +28
    -2
      windows/JackCompilerDeps_os.h
  18. +1
    -1
      windows/JackRouter/JackRouter.cpp

+ 4
- 0
ChangeLog View File

@@ -36,6 +36,10 @@ John Emmas
Jackdmp changes log
---------------------------

2011-10-28 Stephane Letz <letz@grame.fr>

* John Emmas POST_PACKED_STRUCTURE patch.

2011-10-27 Stephane Letz <letz@grame.fr>

* Gabriel Beddingfield patch (r4541) reverted.


+ 1
- 0
common/JackActivationCount.h View File

@@ -33,6 +33,7 @@ struct JackClientControl;
\brief Client activation counter.
*/

PRE_PACKED_STRUCTURE
class JackActivationCount
{



+ 2
- 1
common/JackAtomicArrayState.h View File

@@ -30,7 +30,7 @@ namespace Jack
/*!
\brief Counter for CAS
*/
PRE_PACKED_STRUCTURE
struct AtomicArrayCounter
{
union {
@@ -109,6 +109,7 @@ Requirement:

// CHECK livelock

PRE_PACKED_STRUCTURE
template <class T>
class JackAtomicArrayState
{


+ 2
- 0
common/JackAtomicState.h View File

@@ -31,6 +31,7 @@ namespace Jack
\brief Counter for CAS
*/

PRE_PACKED_STRUCTURE
struct AtomicCounter
{
union {
@@ -84,6 +85,7 @@ struct AtomicCounter

// CHECK livelock

PRE_PACKED_STRUCTURE
template <class T>
class JackAtomicState
{


+ 1
- 0
common/JackClientControl.h View File

@@ -34,6 +34,7 @@ namespace Jack
\brief Client control possibly in shared memory.
*/

PRE_PACKED_STRUCTURE
struct JackClientControl : public JackShmMemAble
{
char fName[JACK_CLIENT_NAME_SIZE + 1];


+ 6
- 0
common/JackConnectionManager.h View File

@@ -36,6 +36,7 @@ struct JackClientControl;
\brief Utility class.
*/

PRE_PACKED_STRUCTURE
template <int SIZE>
class JackFixedArray
{
@@ -122,6 +123,7 @@ class JackFixedArray
\brief Utility class.
*/

PRE_PACKED_STRUCTURE
template <int SIZE>
class JackFixedArray1 : public JackFixedArray<SIZE>
{
@@ -158,6 +160,7 @@ class JackFixedArray1 : public JackFixedArray<SIZE>
\brief Utility class.
*/

PRE_PACKED_STRUCTURE
template <int SIZE>
class JackFixedMatrix
{
@@ -253,6 +256,7 @@ class JackFixedMatrix
\brief Utility class.
*/

PRE_PACKED_STRUCTURE
template <int SIZE>
class JackLoopFeedback
{
@@ -366,6 +370,7 @@ class JackLoopFeedback
\brief For client timing measurements.
*/

PRE_PACKED_STRUCTURE
struct JackClientTiming
{
jack_time_t fSignaledAt;
@@ -402,6 +407,7 @@ struct JackClientTiming
</UL>
*/

PRE_PACKED_STRUCTURE
class SERVER_EXPORT JackConnectionManager
{



+ 1
- 0
common/JackEngineControl.h View File

@@ -45,6 +45,7 @@ class JackGraphManager;
\brief Engine control in shared memory.
*/

PRE_PACKED_STRUCTURE
struct SERVER_EXPORT JackEngineControl : public JackShmMem
{
// Shared state


+ 4
- 0
common/JackEngineProfiling.h View File

@@ -37,6 +37,7 @@ namespace Jack
\brief Timing stucture for a client.
*/

PRE_PACKED_STRUCTURE
struct JackTimingMeasureClient
{
int fRefNum;
@@ -59,6 +60,7 @@ struct JackTimingMeasureClient
\brief Timing interval in the global table for a given client
*/

PRE_PACKED_STRUCTURE
struct JackTimingClientInterval
{
int fRefNum;
@@ -78,6 +80,7 @@ struct JackTimingClientInterval
\brief Timing stucture for a table of clients.
*/

PRE_PACKED_STRUCTURE
struct JackTimingMeasure
{
unsigned int fAudioCycle;
@@ -102,6 +105,7 @@ struct JackTimingMeasure
class JackClientInterface;
class JackGraphManager;

PRE_PACKED_STRUCTURE
class SERVER_EXPORT JackEngineProfiling
{



+ 4
- 1
common/JackFilters.h View File

@@ -38,7 +38,8 @@ namespace Jack

#define MAX_SIZE 64

struct JackFilter
PRE_PACKED_STRUCTURE
struct JackFilter
{

jack_time_t fTable[MAX_SIZE];
@@ -65,6 +66,7 @@ namespace Jack

} POST_PACKED_STRUCTURE;

PRE_PACKED_STRUCTURE
class JackDelayLockedLoop
{

@@ -147,6 +149,7 @@ namespace Jack

} POST_PACKED_STRUCTURE;

PRE_PACKED_STRUCTURE
class JackAtomicDelayLockedLoop : public JackAtomicState<JackDelayLockedLoop>
{
public:


+ 2
- 0
common/JackFrameTimer.h View File

@@ -32,6 +32,7 @@ namespace Jack
\brief A structure used for time management.
*/

PRE_PACKED_STRUCTURE
class SERVER_EXPORT JackTimer
{

@@ -73,6 +74,7 @@ class SERVER_EXPORT JackTimer
\brief A class using the JackAtomicState to manage jack time.
*/

PRE_PACKED_STRUCTURE
class SERVER_EXPORT JackFrameTimer : public JackAtomicState<JackTimer>
{



+ 1
- 0
common/JackGraphManager.h View File

@@ -36,6 +36,7 @@ namespace Jack
\brief Graph manager: contains the connection manager and the port array.
*/

PRE_PACKED_STRUCTURE
class SERVER_EXPORT JackGraphManager : public JackShmMem, public JackAtomicState<JackConnectionManager>
{



+ 1
- 0
common/JackPort.h View File

@@ -35,6 +35,7 @@ namespace Jack
\brief Base class for port.
*/

PRE_PACKED_STRUCTURE
class SERVER_EXPORT JackPort
{



+ 1
- 0
common/JackTransportEngine.h View File

@@ -89,6 +89,7 @@ We have:

class JackClientInterface;

PRE_PACKED_STRUCTURE
class SERVER_EXPORT JackTransportEngine : public JackAtomicArrayState<jack_position_t>
{



+ 6
- 1
common/shm.h View File

@@ -116,6 +116,7 @@ extern "C"
* attached to the address space.
*/

PRE_PACKED_STRUCTURE
typedef struct _jack_shm_info {
jack_shm_registry_index_t index; /* offset into the registry */
uint32_t size;
@@ -124,9 +125,13 @@ extern "C"
char ptr_size[8];
} ptr; /* a "pointer" that has the same 8 bytes size when compling in 32 or 64 bits */
}
#ifdef _MSC_VER
jack_shm_info_t; POST_PACKED_STRUCTURE
#else
POST_PACKED_STRUCTURE jack_shm_info_t;
#endif

/* utility functions used only within JACK */
/* utility functions used only within JACK */

void jack_shm_copy_from_registry (jack_shm_info_t*,
jack_shm_registry_index_t);


+ 3
- 1
macosx/JackCompilerDeps_os.h View File

@@ -23,6 +23,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "JackConstants.h"

#if __GNUC__
#define PRE_PACKED_STRUCTURE

#ifndef POST_PACKED_STRUCTURE
/* POST_PACKED_STRUCTURE needs to be a macro which
expands into a compiler directive. The directive must
@@ -48,7 +50,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#define MEM_ALIGN(x,y) x
#define LIB_EXPORT
#define SERVER_EXPORT
/* Add other things here for non-gcc platforms for POST_PACKED_STRUCTURE */
/* Add other things here for non-gcc platforms for PRE and POST_PACKED_STRUCTURE */
#endif

#endif


+ 4
- 2
posix/JackCompilerDeps_os.h View File

@@ -23,7 +23,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "JackConstants.h"

#if __GNUC__
#ifndef POST_PACKED_STRUCTURE
#define PRE_PACKED_STRUCTURE

#ifndef POST_PACKED_STRUCTURE
/* POST_PACKED_STRUCTURE needs to be a macro which
expands into a compiler directive. The directive must
tell the compiler to arrange the preceding structure
@@ -54,7 +56,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#define MEM_ALIGN(x,y) x
#define LIB_EXPORT
#define SERVER_EXPORT
/* Add other things here for non-gcc platforms for POST_PACKED_STRUCTURE */
/* Add other things here for non-gcc platforms for PRE and POST_PACKED_STRUCTURE */
#endif

#endif


+ 28
- 2
windows/JackCompilerDeps_os.h View File

@@ -22,6 +22,8 @@
#define __JackCompilerDeps_WIN32__

#if __GNUC__
#define PRE_PACKED_STRUCTURE

#ifndef POST_PACKED_STRUCTURE
/* POST_PACKED_STRUCTURE needs to be a macro which
expands into a compiler directive. The directive must
@@ -46,13 +48,37 @@
#define SERVER_EXPORT
#endif
#else
#define MEM_ALIGN(x,y) x
#define LIB_EXPORT __declspec(dllexport)
#define MEM_ALIGN(x,y) x
#define LIB_EXPORT __declspec(dllexport)
#ifdef SERVER_SIDE
#define SERVER_EXPORT __declspec(dllexport)
#else
#define SERVER_EXPORT
#endif

#ifdef _MSC_VER
#if defined(JACK_32_64)
#define PRE_PACKED_STRUCTURE1 __pragma(pack(push,1))
#define PRE_PACKED_STRUCTURE PRE_PACKED_STRUCTURE1
/* PRE_PACKED_STRUCTURE needs to be a macro which
expands into a compiler directive. The directive must
tell the compiler to arrange the following structure
declaration so that it is packed on byte-boundaries rather
than use the natural alignment of the processor and/or
compiler.
*/
#define POST_PACKED_STRUCTURE ;__pragma(pack(pop))
/* and POST_PACKED_STRUCTURE needs to be a macro which
restores the packing to its previous setting */
#else
#define PRE_PACKED_STRUCTURE
#define POST_PACKED_STRUCTURE
#endif
#else
/* Other Windows compilers to go here */
#define PRE_PACKED_STRUCTURE
#define POST_PACKED_STRUCTURE
#endif
#endif

#endif

+ 1
- 1
windows/JackRouter/JackRouter.cpp View File

@@ -252,7 +252,7 @@ static bool GetEXEName(DWORD dwProcessID, char* name)
HMODULE hMod;
DWORD cbNeeded;
if(EnumProcessModules(hProcess, &hMod,
if (EnumProcessModules(hProcess, &hMod,
sizeof(hMod), &cbNeeded)) {
//Get the name of the exe file
GetModuleBaseName(hProcess, hMod, szEXEName,


Loading…
Cancel
Save