| @@ -33,7 +33,7 @@ struct JackClientControl; | |||
| \brief Client activation counter. | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| class JackActivationCount | |||
| { | |||
| @@ -74,7 +74,7 @@ class JackActivationCount | |||
| return fValue; | |||
| } | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| } // end of namespace | |||
| @@ -30,7 +30,7 @@ namespace Jack | |||
| /*! | |||
| \brief Counter for CAS | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| struct AtomicArrayCounter | |||
| { | |||
| union { | |||
| @@ -68,7 +68,7 @@ struct AtomicArrayCounter | |||
| return *this; | |||
| } | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| #define Counter1(e) (e).info.fLongVal | |||
| #define GetIndex1(e, state) ((e).info.scounter.fByteVal[state]) | |||
| @@ -109,7 +109,7 @@ Requirement: | |||
| // CHECK livelock | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| template <class T> | |||
| class JackAtomicArrayState | |||
| { | |||
| @@ -249,7 +249,7 @@ class JackAtomicArrayState | |||
| WriteNextStateStopAux(state); | |||
| } | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| } // end of namespace | |||
| @@ -31,7 +31,7 @@ namespace Jack | |||
| \brief Counter for CAS | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| struct AtomicCounter | |||
| { | |||
| union { | |||
| @@ -70,7 +70,7 @@ struct AtomicCounter | |||
| return *this; | |||
| } | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| #define Counter(e) (e).info.fLongVal | |||
| #define CurIndex(e) (e).info.scounter.fShortVal1 | |||
| @@ -85,7 +85,7 @@ struct AtomicCounter | |||
| // CHECK livelock | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| template <class T> | |||
| class JackAtomicState | |||
| { | |||
| @@ -254,7 +254,7 @@ class JackAtomicState | |||
| } | |||
| */ | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| } // end of namespace | |||
| @@ -34,7 +34,7 @@ namespace Jack | |||
| \brief Client control possibly in shared memory. | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| struct JackClientControl : public JackShmMemAble | |||
| { | |||
| char fName[JACK_CLIENT_NAME_SIZE + 1]; | |||
| @@ -88,7 +88,7 @@ struct JackClientControl : public JackShmMemAble | |||
| fSessionID = uuid; | |||
| } | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| } // end of namespace | |||
| @@ -36,7 +36,7 @@ struct JackClientControl; | |||
| \brief Utility class. | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| template <int SIZE> | |||
| class JackFixedArray | |||
| { | |||
| @@ -117,13 +117,13 @@ class JackFixedArray | |||
| return fCounter; | |||
| } | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| /*! | |||
| \brief Utility class. | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| template <int SIZE> | |||
| class JackFixedArray1 : public JackFixedArray<SIZE> | |||
| { | |||
| @@ -154,13 +154,13 @@ class JackFixedArray1 : public JackFixedArray<SIZE> | |||
| } | |||
| } | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| /*! | |||
| \brief Utility class. | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| template <int SIZE> | |||
| class JackFixedMatrix | |||
| { | |||
| @@ -250,13 +250,13 @@ class JackFixedMatrix | |||
| } | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| /*! | |||
| \brief Utility class. | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| template <int SIZE> | |||
| class JackLoopFeedback | |||
| { | |||
| @@ -364,13 +364,13 @@ class JackLoopFeedback | |||
| return -1; | |||
| } | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| /*! | |||
| \brief For client timing measurements. | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| struct JackClientTiming | |||
| { | |||
| jack_time_t fSignaledAt; | |||
| @@ -393,7 +393,7 @@ struct JackClientTiming | |||
| fStatus = NotTriggered; | |||
| } | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| /*! | |||
| \brief Connection manager. | |||
| @@ -407,7 +407,7 @@ struct JackClientTiming | |||
| </UL> | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| class SERVER_EXPORT JackConnectionManager | |||
| { | |||
| @@ -487,7 +487,7 @@ class SERVER_EXPORT JackConnectionManager | |||
| int SuspendRefNum(JackClientControl* control, JackSynchro* table, JackClientTiming* timing, long time_out_usec); | |||
| void TopologicalSort(std::vector<jack_int_t>& sorted); | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| } // end of namespace | |||
| @@ -41,11 +41,13 @@ class JackGraphManager; | |||
| #define JACK_ENGINE_ROLLING_COUNT 32 | |||
| #define JACK_ENGINE_ROLLING_INTERVAL 1024 | |||
| typedef JACK_ALIGNED_TYPE(UInt64) jack_UInt64; | |||
| /*! | |||
| \brief Engine control in shared memory. | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| struct SERVER_EXPORT JackEngineControl : public JackShmMem | |||
| { | |||
| // Shared state | |||
| @@ -81,9 +83,9 @@ struct SERVER_EXPORT JackEngineControl : public JackShmMem | |||
| float fCPULoad; | |||
| // For OSX thread | |||
| UInt64 fPeriod; | |||
| UInt64 fComputation; | |||
| UInt64 fConstraint; | |||
| jack_UInt64 fPeriod; | |||
| jack_UInt64 fComputation; | |||
| jack_UInt64 fConstraint; | |||
| // Timer | |||
| JackFrameTimer fFrameTimer; | |||
| @@ -181,7 +183,7 @@ struct SERVER_EXPORT JackEngineControl : public JackShmMem | |||
| void CalcCPULoad(JackClientInterface** table, JackGraphManager* manager, jack_time_t cur_cycle_begin, jack_time_t prev_cycle_end); | |||
| void ResetRollingUsecs(); | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| } // end of namespace | |||
| @@ -37,7 +37,7 @@ namespace Jack | |||
| \brief Timing stucture for a client. | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| struct JackTimingMeasureClient | |||
| { | |||
| int fRefNum; | |||
| @@ -54,13 +54,13 @@ struct JackTimingMeasureClient | |||
| fStatus((jack_client_state_t)0) | |||
| {} | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| /*! | |||
| \brief Timing interval in the global table for a given client | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| struct JackTimingClientInterval | |||
| { | |||
| int fRefNum; | |||
| @@ -74,13 +74,13 @@ struct JackTimingClientInterval | |||
| fEndInterval(-1) | |||
| {} | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| /*! | |||
| \brief Timing stucture for a table of clients. | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| struct JackTimingMeasure | |||
| { | |||
| unsigned int fAudioCycle; | |||
| @@ -96,7 +96,7 @@ struct JackTimingMeasure | |||
| fPrevCycleEnd(0) | |||
| {} | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| /*! | |||
| \brief Client timing monitoring. | |||
| @@ -105,7 +105,7 @@ struct JackTimingMeasure | |||
| class JackClientInterface; | |||
| class JackGraphManager; | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| class SERVER_EXPORT JackEngineProfiling | |||
| { | |||
| @@ -132,7 +132,7 @@ class SERVER_EXPORT JackEngineProfiling | |||
| JackTimingMeasure* GetCurMeasure(); | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| } // end of namespace | |||
| @@ -38,7 +38,7 @@ namespace Jack | |||
| #define MAX_SIZE 64 | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| struct JackFilter | |||
| { | |||
| @@ -64,9 +64,9 @@ namespace Jack | |||
| return mean / MAX_SIZE; | |||
| } | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| class JackDelayLockedLoop | |||
| { | |||
| @@ -147,9 +147,9 @@ namespace Jack | |||
| return fCurrentWakeup; | |||
| } | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| class JackAtomicDelayLockedLoop : public JackAtomicState<JackDelayLockedLoop> | |||
| { | |||
| public: | |||
| @@ -213,7 +213,7 @@ namespace Jack | |||
| return res; | |||
| } | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| #endif | |||
| @@ -32,7 +32,7 @@ namespace Jack | |||
| \brief A structure used for time management. | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| class SERVER_EXPORT JackTimer | |||
| { | |||
| @@ -69,13 +69,13 @@ class SERVER_EXPORT JackTimer | |||
| return fCurrentWakeup; | |||
| } | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| /*! | |||
| \brief A class using the JackAtomicState to manage jack time. | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| class SERVER_EXPORT JackFrameTimer : public JackAtomicState<JackTimer> | |||
| { | |||
| @@ -97,7 +97,7 @@ class SERVER_EXPORT JackFrameTimer : public JackAtomicState<JackTimer> | |||
| void IncFrameTime(jack_nframes_t buffer_size, jack_time_t callback_usecs, jack_time_t period_usecs); | |||
| void ReadFrameTime(JackTimer* timer); | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| } // end of namespace | |||
| @@ -36,7 +36,7 @@ namespace Jack | |||
| \brief Graph manager: contains the connection manager and the port array. | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| class SERVER_EXPORT JackGraphManager : public JackShmMem, public JackAtomicState<JackConnectionManager> | |||
| { | |||
| @@ -137,7 +137,7 @@ class SERVER_EXPORT JackGraphManager : public JackShmMem, public JackAtomicState | |||
| static JackGraphManager* Allocate(int port_max); | |||
| static void Destroy(JackGraphManager* manager); | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| } // end of namespace | |||
| @@ -84,7 +84,6 @@ namespace Jack | |||
| are kept in LITTLE_ENDIAN format (to avoid 2 conversions in the more common LITTLE_ENDIAN <==> LITTLE_ENDIAN connection case). | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| struct _session_params | |||
| { | |||
| char fPacketType[8]; //packet type ('param') | |||
| @@ -106,7 +105,7 @@ namespace Jack | |||
| uint32_t fKBps; //KB per second for CELT encoder | |||
| uint32_t fSlaveSyncMode; //is the slave in sync mode ? | |||
| uint32_t fNetworkLatency; //network latency | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| //net status ********************************************************************************** | |||
| @@ -167,7 +166,6 @@ namespace Jack | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| struct _packet_header | |||
| { | |||
| char fPacketType[8]; //packet type ('headr') | |||
| @@ -180,7 +178,7 @@ namespace Jack | |||
| uint32_t fCycle; //process cycle counter | |||
| uint32_t fSubCycle; //midi/audio subcycle counter | |||
| uint32_t fIsLastPckt; //is it the last packet of a given cycle ('y' or 'n') | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| //net timebase master | |||
| @@ -205,14 +203,13 @@ namespace Jack | |||
| \Brief This structure contains transport data to be sent over the network | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| struct _net_transport_data | |||
| { | |||
| uint32_t fNewState; //is it a state change | |||
| uint32_t fTimebaseMaster; //is there a new timebase master | |||
| int32_t fState; //current cycle state | |||
| jack_position_t fPosition; //current cycle position | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| //midi data *********************************************************************************** | |||
| @@ -35,7 +35,7 @@ namespace Jack | |||
| \brief Base class for port. | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| class SERVER_EXPORT JackPort | |||
| { | |||
| @@ -113,7 +113,7 @@ class SERVER_EXPORT JackPort | |||
| int GetRefNum() const; | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| } // end of namespace | |||
| @@ -89,7 +89,7 @@ We have: | |||
| class JackClientInterface; | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| class SERVER_EXPORT JackTransportEngine : public JackAtomicArrayState<jack_position_t> | |||
| { | |||
| @@ -194,7 +194,7 @@ class SERVER_EXPORT JackTransportEngine : public JackAtomicArrayState<jack_posit | |||
| fNetworkSync = sync; | |||
| } | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| } // end of namespace | |||
| @@ -21,6 +21,7 @@ | |||
| #ifndef __JackTypes__ | |||
| #define __JackTypes__ | |||
| #include "types.h" | |||
| #include "JackCompilerDeps.h" | |||
| typedef unsigned short UInt16; | |||
| @@ -34,12 +35,6 @@ typedef signed long SInt32; | |||
| #include "JackTypes_os.h" | |||
| /** | |||
| * Type used to represent the value of free running | |||
| * monotonic clock with units of microseconds. | |||
| */ | |||
| typedef uint64_t jack_time_t; | |||
| typedef uint16_t jack_int_t; // Internal type for ports and refnum | |||
| typedef enum { | |||
| @@ -20,38 +20,29 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
| #ifndef __jack_systemdeps_h__ | |||
| #define __jack_systemdeps_h__ | |||
| #ifndef POST_PACKED_STRUCTURE | |||
| #ifndef JACK_ALIGNED_TYPE | |||
| #ifdef __GNUC__ | |||
| /* 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 | |||
| declaration so that it is packed on byte-boundaries rather | |||
| than use the natural alignment of the processor and/or | |||
| compiler. | |||
| */ | |||
| #define PRE_PACKED_STRUCTURE | |||
| #define POST_PACKED_STRUCTURE __attribute__((__packed__)) | |||
| #define JACK_ALIGN(N) __attribute__((__aligned__(N))) | |||
| /* A utility for declaring a type which is aligned to its size. */ | |||
| #define JACK_ALIGNED_TYPE(T) JACK_ALIGN(sizeof(T)) T | |||
| #else | |||
| #ifdef _MSC_VER | |||
| #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 */ | |||
| #define JACK_ALIGN(N) __declspec(align(N)) | |||
| /* A utility for declaring a type which is aligned to its size. */ | |||
| #define JACK_ALIGNED_TYPE(T) JACK_ALIGN(sizeof(T)) T | |||
| #else | |||
| #define PRE_PACKED_STRUCTURE | |||
| #define POST_PACKED_STRUCTURE | |||
| #define JACK_ALIGN(N) | |||
| #define JACK_ALIGNED_TYPE(T) T | |||
| #endif | |||
| #endif | |||
| @@ -23,6 +23,14 @@ | |||
| #include <jack/systemdeps.h> | |||
| /* To facilitate direct sharing between 32-bit and 64-bit code, declare | |||
| * fully-aligned typedefs for types which would otherwise have differing | |||
| * alignment between the two. | |||
| */ | |||
| typedef JACK_ALIGNED_TYPE(double) jack_double; | |||
| typedef JACK_ALIGNED_TYPE(int64_t) jack_int64_t; | |||
| typedef JACK_ALIGNED_TYPE(uint64_t) jack_uint64_t; | |||
| typedef int32_t jack_shmsize_t; | |||
| /** | |||
| @@ -39,7 +47,7 @@ typedef uint32_t jack_nframes_t; | |||
| * Type used to represent the value of free running | |||
| * monotonic clock with units of microseconds. | |||
| */ | |||
| typedef uint64_t jack_time_t; | |||
| typedef jack_uint64_t jack_time_t; | |||
| /** | |||
| * Maximum size of @a load_init string passed to an internal client | |||
| @@ -259,7 +267,7 @@ typedef void (*JackLatencyCallback)(jack_latency_callback_mode_t mode, void *arg | |||
| /** | |||
| * the new latency API operates on Ranges. | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| struct _jack_latency_range | |||
| { | |||
| /** | |||
| @@ -270,7 +278,7 @@ struct _jack_latency_range | |||
| * maximum latency | |||
| */ | |||
| jack_nframes_t max; | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| typedef struct _jack_latency_range jack_latency_range_t; | |||
| @@ -530,7 +538,7 @@ typedef enum { | |||
| } jack_transport_state_t; | |||
| typedef uint64_t jack_unique_t; /**< Unique ID (opaque) */ | |||
| typedef jack_uint64_t jack_unique_t; /**< Unique ID (opaque) */ | |||
| /** | |||
| * Optional struct jack_position_t fields. | |||
| @@ -549,7 +557,7 @@ typedef enum { | |||
| #define JACK_POSITION_MASK (JackPositionBBT|JackPositionTimecode) | |||
| #define EXTENDED_TIME_INFO | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| struct _jack_position { | |||
| /* these four cannot be set from clients: the server sets them */ | |||
| @@ -564,16 +572,16 @@ struct _jack_position { | |||
| int32_t bar; /**< current bar */ | |||
| int32_t beat; /**< current beat-within-bar */ | |||
| int32_t tick; /**< current tick-within-beat */ | |||
| double bar_start_tick; | |||
| jack_double bar_start_tick; | |||
| float beats_per_bar; /**< time signature "numerator" */ | |||
| float beat_type; /**< time signature "denominator" */ | |||
| double ticks_per_beat; | |||
| double beats_per_minute; | |||
| jack_double ticks_per_beat; | |||
| jack_double beats_per_minute; | |||
| /* JackPositionTimecode fields: (EXPERIMENTAL: could change) */ | |||
| double frame_time; /**< current time in seconds */ | |||
| double next_time; /**< next sequential frame_time | |||
| jack_double frame_time; /**< current time in seconds */ | |||
| jack_double next_time; /**< next sequential frame_time | |||
| (unless repositioned) */ | |||
| /* JackBBTFrameOffset fields: */ | |||
| @@ -616,7 +624,7 @@ struct _jack_position { | |||
| /* When (unique_1 == unique_2) the contents are consistent. */ | |||
| jack_unique_t unique_2; /**< unique ID */ | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| typedef struct _jack_position jack_position_t; | |||
| @@ -149,15 +149,15 @@ extern "C" | |||
| * attached to the address space. | |||
| */ | |||
| PRE_PACKED_STRUCTURE | |||
| /* Note: This class must be kept 32/64 clean! */ | |||
| struct _jack_shm_info { | |||
| jack_shm_registry_index_t index; /* offset into the registry */ | |||
| uint32_t size; | |||
| union { | |||
| JACK_ALIGN(8) union { | |||
| void *attached_at; /* address where attached */ | |||
| char ptr_size[8]; | |||
| } ptr; /* a "pointer" that has the same 8 bytes size when compling in 32 or 64 bits */ | |||
| } POST_PACKED_STRUCTURE; | |||
| }; | |||
| typedef struct _jack_shm_info jack_shm_info_t; | |||
| @@ -24,18 +24,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
| #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 | |||
| tell the compiler to arrange the preceding 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 __attribute__((__packed__)) | |||
| #endif | |||
| #define MEM_ALIGN(x,y) x __attribute__((aligned(y))) | |||
| #define LIB_EXPORT __attribute__((visibility("default"))) | |||
| #ifdef SERVER_SIDE | |||
| @@ -47,7 +35,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 PRE and POST_PACKED_STRUCTURE */ | |||
| /* Add other things here for non-gcc platforms */ | |||
| #endif | |||
| #endif | |||
| @@ -23,19 +23,7 @@ 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 | |||
| tell the compiler to arrange the preceding 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 __attribute__((__packed__)) | |||
| #endif | |||
| #define MEM_ALIGN(x,y) x __attribute__((aligned(y))) | |||
| #define LIB_EXPORT __attribute__((visibility("default"))) | |||
| #ifdef SERVER_SIDE | |||
| @@ -53,9 +41,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
| #define LIB_EXPORT | |||
| #define SERVER_EXPORT | |||
| /* Add other things here for non-gcc platforms for PRE and POST_PACKED_STRUCTURE */ | |||
| #define PRE_PACKED_STRUCTURE | |||
| #define POST_PACKED_STRUCTURE | |||
| /* Add other things here for non-gcc platforms */ | |||
| #endif | |||
| #endif | |||
| @@ -26,8 +26,6 @@ | |||
| typedef unsigned long long UInt64; | |||
| typedef pthread_key_t jack_tls_key; | |||
| typedef pthread_t jack_native_thread_t; | |||
| typedef int (*jack_thread_creator_t)(pthread_t*, const pthread_attr_t*, void* (*function)(void*), void* arg); | |||
| #endif | |||
| @@ -33,41 +33,10 @@ | |||
| #define MEM_ALIGN(x,y) x __attribute__((aligned(y))) | |||
| #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 | |||
| 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 __attribute__((__packed__)) | |||
| #endif | |||
| #else | |||
| #define MEM_ALIGN(x,y) x | |||
| #ifdef _MSC_VER | |||
| #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 | |||
| /* Other Windows compilers to go here */ | |||
| #define PRE_PACKED_STRUCTURE | |||
| #define POST_PACKED_STRUCTURE | |||
| #endif | |||
| #endif | |||
| #if defined(_MSC_VER) /* Added by JE - 31-01-2012 */ | |||
| @@ -27,7 +27,6 @@ typedef ULONGLONG UInt64; | |||
| typedef UInt64 uint64_t; | |||
| typedef unsigned short uint16_t; | |||
| typedef DWORD jack_tls_key; | |||
| typedef HANDLE jack_native_thread_t; | |||
| #endif | |||