Commit 7e46cbea authored by Stéphane Letz's avatar Stéphane Letz
Browse files

Merge branch 'master' into server_no_deadlock

parents 6cb124d7 107ffada
......@@ -3,6 +3,7 @@
---------------------------
Dmitry Baikov
Gabriel M. Beddingfield
Steven Chamberlain
Thom Johansen
Thibault LeMeur
......@@ -21,12 +22,24 @@ Torben Hohn
Paul Davis
Peter L Jones
Devin Anderson
Josh Green
Josh Green
Mario Lang
---------------------------
Jackdmp changes log
---------------------------
2010-01-29 Gabriel M. Beddingfield <gabriel@teuton.org>
* Change JackEngineProfiling and JackAudioAdapterInterface gnuplot scripts to output SVG instead of PDF.
2009-12-15 Stephane Letz <letz@grame.fr>
* Shared memory manager was calling abort in case of fatal error, now return an error in caller.
2009-12-13 Stephane Letz <letz@grame.fr>
* Mario Lang alsa_io time calculation overflow patch.
2009-12-10 Stephane Letz <letz@grame.fr>
......
......@@ -68,8 +68,8 @@ namespace Jack
fprintf(file, buffer);
fprintf(file, "\n unset multiplot\n");
fprintf(file, "set output 'AdapterTiming1.pdf\n");
fprintf(file, "set terminal pdf\n");
fprintf(file, "set output 'AdapterTiming1.svg\n");
fprintf(file, "set terminal svg\n");
fprintf(file, "set multiplot\n");
fprintf(file, "set grid\n");
......@@ -80,8 +80,10 @@ namespace Jack
fprintf(file, "plot ");
sprintf(buffer, "\"JackAudioAdapter.log\" using 2 title \"Consumer interrupt period\" with lines,");
fprintf(file, buffer);
sprintf(buffer, "\"JackAudioAdapter.log\" using 3 title \"Producer interrupt period\" with lines");
sprintf(buffer, "\"JackAudioAdapter.log\" using 3 title \"Producer interrupt period\" with lines\n");
fprintf(file, buffer);
fprintf(file, "unset multiplot\n");
fprintf(file, "unset output\n");
fclose(file);
......@@ -100,8 +102,8 @@ namespace Jack
fprintf(file, buffer);
fprintf(file, "\n unset multiplot\n");
fprintf(file, "set output 'AdapterTiming2.pdf\n");
fprintf(file, "set terminal pdf\n");
fprintf(file, "set output 'AdapterTiming2.svg\n");
fprintf(file, "set terminal svg\n");
fprintf(file, "set multiplot\n");
fprintf(file, "set grid\n");
......@@ -112,8 +114,10 @@ namespace Jack
fprintf(file, "plot ");
sprintf(buffer, "\"JackAudioAdapter.log\" using 4 title \"Ratio 1\" with lines,");
fprintf(file, buffer);
sprintf(buffer, "\"JackAudioAdapter.log\" using 5 title \"Ratio 2\" with lines");
sprintf(buffer, "\"JackAudioAdapter.log\" using 5 title \"Ratio 2\" with lines\n");
fprintf(file, buffer);
fprintf(file, "unset multiplot\n");
fprintf(file, "unset output\n");
fclose(file);
......@@ -132,8 +136,8 @@ namespace Jack
fprintf(file, buffer);
fprintf(file, "\n unset multiplot\n");
fprintf(file, "set output 'AdapterTiming3.pdf\n");
fprintf(file, "set terminal pdf\n");
fprintf(file, "set output 'AdapterTiming3.svg\n");
fprintf(file, "set terminal svg\n");
fprintf(file, "set multiplot\n");
fprintf(file, "set grid\n");
......@@ -144,8 +148,10 @@ namespace Jack
fprintf(file, "plot ");
sprintf(buffer, "\"JackAudioAdapter.log\" using 6 title \"Frames position in consumer ringbuffer\" with lines,");
fprintf(file, buffer);
sprintf(buffer, "\"JackAudioAdapter.log\" using 7 title \"Frames position in producer ringbuffer\" with lines");
sprintf(buffer, "\"JackAudioAdapter.log\" using 7 title \"Frames position in producer ringbuffer\" with lines\n");
fprintf(file, buffer);
fprintf(file, "unset multiplot\n");
fprintf(file, "unset output\n");
fclose(file);
}
......
......@@ -121,7 +121,7 @@ void JackDebugClient::CheckClient(const char* function_name) const
*fStream << "!!! ERROR !!! : Accessing a client '" << fClientName << "' already closed " << "from " << function_name << endl;
*fStream << "This is likely to cause crash !'" << endl;
#ifdef __APPLE__
Debugger();
// Debugger();
#endif
}
}
......
......@@ -167,7 +167,7 @@ int JackDriver::Open(jack_nframes_t buffer_size,
int JackDriver::Close()
{
if (fClientControl.fRefNum > 0) {
if (fClientControl.fRefNum >= 0) {
jack_log("JackDriver::Close");
fGraphManager->DirectDisconnect(fClientControl.fRefNum, fClientControl.fRefNum); // Disconnect driver from itself for sync
fClientControl.fActive = false;
......
......@@ -95,7 +95,7 @@ JackEngineProfiling::~JackEngineProfiling()
std::ofstream fStream1("Timing1.plot", std::ios_base::ate);
if (!fStream1.is_open()) {
jack_error("JackEngineProfiling::Save cannot open Timing1.log file");
jack_error("JackEngineProfiling::Save cannot open Timing1.plot file");
} else {
fStream1 << "set grid\n";
......@@ -104,21 +104,22 @@ JackEngineProfiling::~JackEngineProfiling()
fStream1 << "set ylabel \"usec\"\n";
fStream1 << "plot \"JackEngineProfiling.log\" using 1 title \"Audio period\" with lines \n";
fStream1 << "set output 'Timing1.pdf\n";
fStream1 << "set terminal pdf\n";
fStream1 << "set output 'Timing1.svg\n";
fStream1 << "set terminal svg\n";
fStream1 << "set grid\n";
fStream1 << "set title \"Audio driver timing\"\n";
fStream1 << "set xlabel \"audio cycles\"\n";
fStream1 << "set ylabel \"usec\"\n";
fStream1 << "plot \"JackEngineProfiling.log\" using 1 title \"Audio period\" with lines \n";
fStream1 << "unset output\n";
}
// Driver end date
std::ofstream fStream2("Timing2.plot", std::ios_base::ate);
if (!fStream2.is_open()) {
jack_error("JackEngineProfiling::Save cannot open Timing2.log file");
jack_error("JackEngineProfiling::Save cannot open Timing2.plot file");
} else {
fStream2 << "set grid\n";
......@@ -127,14 +128,15 @@ JackEngineProfiling::~JackEngineProfiling()
fStream2 << "set ylabel \"usec\"\n";
fStream2 << "plot \"JackEngineProfiling.log\" using 2 title \"Driver end date\" with lines \n";
fStream2 << "set output 'Timing2.pdf\n";
fStream2 << "set terminal pdf\n";
fStream2 << "set output 'Timing2.svg\n";
fStream2 << "set terminal svg\n";
fStream2 << "set grid\n";
fStream2 << "set title \"Driver end date\"\n";
fStream2 << "set xlabel \"audio cycles\"\n";
fStream2 << "set ylabel \"usec\"\n";
fStream2 << "plot \"JackEngineProfiling.log\" using 2 title \"Driver end date\" with lines \n";
fStream2 << "unset output\n";
}
// Clients end date
......@@ -142,7 +144,7 @@ JackEngineProfiling::~JackEngineProfiling()
std::ofstream fStream3("Timing3.plot", std::ios_base::ate);
if (!fStream3.is_open()) {
jack_error("JackEngineProfiling::Save cannot open Timing3.log file");
jack_error("JackEngineProfiling::Save cannot open Timing3.plot file");
} else {
fStream3 << "set multiplot\n";
......@@ -170,8 +172,8 @@ JackEngineProfiling::~JackEngineProfiling()
}
fStream3 << "\n unset multiplot\n";
fStream3 << "set output 'Timing3.pdf\n";
fStream3 << "set terminal pdf\n";
fStream3 << "set output 'Timing3.svg\n";
fStream3 << "set terminal svg\n";
fStream3 << "set multiplot\n";
fStream3 << "set grid\n";
......@@ -196,6 +198,8 @@ JackEngineProfiling::~JackEngineProfiling()
fStream3 << "\"JackEngineProfiling.log\" using " << ((i + 1) * 7) - 1 << " title \"" << fIntervalTable[i].fName << "\" with lines,";
}
}
fStream3 << "\nunset multiplot\n";
fStream3 << "unset output\n";
}
}
......@@ -204,7 +208,7 @@ JackEngineProfiling::~JackEngineProfiling()
std::ofstream fStream4("Timing4.plot", std::ios_base::ate);
if (!fStream4.is_open()) {
jack_error("JackEngineProfiling::Save cannot open Timing4.log file");
jack_error("JackEngineProfiling::Save cannot open Timing4.plot file");
} else {
fStream4 << "set multiplot\n";
......@@ -222,8 +226,8 @@ JackEngineProfiling::~JackEngineProfiling()
}
fStream4 << "\n unset multiplot\n";
fStream4 << "set output 'Timing4.pdf\n";
fStream4 << "set terminal pdf\n";
fStream4 << "set output 'Timing4.svg\n";
fStream4 << "set terminal svg\n";
fStream4 << "set multiplot\n";
fStream4 << "set grid\n";
......@@ -238,6 +242,8 @@ JackEngineProfiling::~JackEngineProfiling()
fStream4 << "\"JackEngineProfiling.log\" using " << ((i + 1) * 7) << " title \"" << fIntervalTable[i].fName << "\" with lines,";
}
}
fStream4 << "\nunset multiplot\n";
fStream4 << "unset output\n";
}
}
......@@ -246,7 +252,7 @@ JackEngineProfiling::~JackEngineProfiling()
std::ofstream fStream5("Timing5.plot", std::ios_base::ate);
if (!fStream5.is_open()) {
jack_error("JackEngineProfiling::Save cannot open Timing5.log file");
jack_error("JackEngineProfiling::Save cannot open Timing5.plot file");
} else {
fStream5 << "set multiplot\n";
......@@ -264,8 +270,8 @@ JackEngineProfiling::~JackEngineProfiling()
}
fStream5 << "\n unset multiplot\n";
fStream5 << "set output 'Timing5.pdf\n";
fStream5 << "set terminal pdf\n";
fStream5 << "set output 'Timing5.svg\n";
fStream5 << "set terminal svg\n";
fStream5 << "set multiplot\n";
fStream5 << "set grid\n";
......@@ -280,8 +286,47 @@ JackEngineProfiling::~JackEngineProfiling()
fStream5 << "\"JackEngineProfiling.log\" using " << ((i + 1) * 7) + 1 << " title \"" << fIntervalTable[i].fName << "\" with lines,";
}
}
fStream5 << "\nunset multiplot\n";
fStream5 << "unset output\n";
}
}
std::ofstream fStream6("Timings.html", std::ios_base::ate);
if (!fStream6.is_open()) {
jack_error("JackEngineProfiling::Save cannot open Timings.html file");
} else {
fStream6 << "<?xml version='1.0' encoding='utf-8'?>\n";
fStream6 << "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n";
fStream6 << "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
fStream6 << "<html xmlns='http://www.w3.org/1999/xhtml' lang='en'>\n";
fStream6 << " <head>\n";
fStream6 << " <title>JACK engine profiling</title>\n";
fStream6 << " <!-- assuming that images are 600px wide -->\n";
fStream6 << " <style media='all' type='text/css'>\n";
fStream6 << " .center { margin-left:auto ; margin-right: auto; width: 650px; height: 550px }\n";
fStream6 << " </style>\n";
fStream6 << " </head>\n";
fStream6 << " <body>\n";
fStream6 << " <h2 style='text-align:center'>JACK engine profiling</h2>\n";
fStream6 << " <div class='center'><object class='center' type='image/svg+xml' data='Timing1.svg'>Timing1</object></div>";
fStream6 << " <div class='center'><object class='center' type='image/svg+xml' data='Timing2.svg'>Timing2</object></div>";
fStream6 << " <div class='center'><object class='center' type='image/svg+xml' data='Timing3.svg'>Timing3</object></div>";
fStream6 << " <div class='center'><object class='center' type='image/svg+xml' data='Timing4.svg'>Timing4</object></div>";
fStream6 << " <div class='center'><object class='center' type='image/svg+xml' data='Timing5.svg'>Timing5</object></div>";
fStream6 << " </body>\n";
fStream6 << "</html>\n";
}
std::ofstream fStream7("generate_timings", std::ios_base::ate);
if (!fStream7.is_open()) {
jack_error("JackEngineProfiling::Save cannot open generate_timings file");
} else {
fStream7 << "gnuplot -persist Timing1.plot \n";
fStream7 << "gnuplot -persist Timing2.plot\n";
fStream7 << "gnuplot -persist Timing3.plot\n";
fStream7 << "gnuplot -persist Timing4.plot\n";
fStream7 << "gnuplot -persist Timing5.plot\n";
}
}
bool JackEngineProfiling::CheckClient(const char* name, int cur_point)
......
......@@ -103,6 +103,9 @@ int JackLibClient::Open(const char* server_name, const char* name, jack_options_
} catch (int n) {
jack_error("Map shared memory segments exception %d", n);
goto error;
} catch (...) {
jack_error("Unknown error...");
goto error;
}
SetupDriverSync(false);
......
......@@ -17,8 +17,6 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
//#define HAVE_CELT 1
#ifdef WIN32
#include <malloc.h>
#endif
......
This diff is collapsed.
......@@ -27,7 +27,7 @@ extern "C" {
#include <jack/types.h>
#include <stdlib.h>
#include <jack/weakmacros.h>
/** Type for raw event data contained in @ref jack_midi_event_t. */
typedef unsigned char jack_midi_data_t;
......@@ -53,7 +53,7 @@ typedef struct _jack_midi_event
* @return number of events inside @a port_buffer
*/
jack_nframes_t
jack_midi_get_event_count(void* port_buffer);
jack_midi_get_event_count(void* port_buffer) JACK_OPTIONAL_WEAK_EXPORT;
/** Get a MIDI event from an event port buffer.
......@@ -70,7 +70,7 @@ jack_midi_get_event_count(void* port_buffer);
int
jack_midi_event_get(jack_midi_event_t *event,
void *port_buffer,
jack_nframes_t event_index);
jack_nframes_t event_index) JACK_OPTIONAL_WEAK_EXPORT;
/** Clear an event buffer.
......@@ -82,7 +82,7 @@ jack_midi_event_get(jack_midi_event_t *event,
* @param port_buffer Port buffer to clear (must be an output port buffer).
*/
void
jack_midi_clear_buffer(void *port_buffer);
jack_midi_clear_buffer(void *port_buffer) JACK_OPTIONAL_WEAK_EXPORT;
/** Get the size of the largest event that can be stored by the port.
......@@ -93,7 +93,7 @@ jack_midi_clear_buffer(void *port_buffer);
* @param port_buffer Port buffer to check size of.
*/
size_t
jack_midi_max_event_size(void* port_buffer);
jack_midi_max_event_size(void* port_buffer) JACK_OPTIONAL_WEAK_EXPORT;
/** Allocate space for an event to be written to an event port buffer.
......@@ -112,9 +112,9 @@ jack_midi_max_event_size(void* port_buffer);
* NULL on error (ie not enough space).
*/
jack_midi_data_t*
jack_midi_event_reserve(void *port_buffer,
jack_midi_event_reserve(void *port_buffer,
jack_nframes_t time,
size_t data_size);
size_t data_size) JACK_OPTIONAL_WEAK_EXPORT;
/** Write an event into an event port buffer.
......@@ -130,10 +130,10 @@ jack_midi_event_reserve(void *port_buffer,
* @return 0 on success, ENOBUFS if there's not enough space in buffer for event.
*/
int
jack_midi_event_write(void *port_buffer,
jack_nframes_t time,
jack_midi_event_write(void *port_buffer,
jack_nframes_t time,
const jack_midi_data_t *data,
size_t data_size);
size_t data_size) JACK_OPTIONAL_WEAK_EXPORT;
/** Get the number of events that could not be written to @a port_buffer.
......@@ -145,7 +145,7 @@ jack_midi_event_write(void *port_buffer,
* @returns Number of events that could not be written to @a port_buffer.
*/
jack_nframes_t
jack_midi_get_lost_event_count(void *port_buffer);
jack_midi_get_lost_event_count(void *port_buffer) JACK_OPTIONAL_WEAK_EXPORT;
/*@}*/
......
......@@ -26,6 +26,7 @@ extern "C"
#endif
#include <jack/systemdeps.h>
#include <jack/weakmacros.h>
/** @file thread.h
*
......@@ -45,7 +46,7 @@ extern "C"
* Otherwise returns -1.
*/
int jack_client_real_time_priority (jack_client_t*);
int jack_client_real_time_priority (jack_client_t*) JACK_OPTIONAL_WEAK_EXPORT;
/**
* @returns if JACK is running with realtime scheduling, this returns
......@@ -53,7 +54,7 @@ int jack_client_real_time_priority (jack_client_t*);
* is subject to realtime scheduling. Otherwise returns -1.
*/
int jack_client_max_real_time_priority (jack_client_t*);
int jack_client_max_real_time_priority (jack_client_t*) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Attempt to enable realtime scheduling for a thread. On some
......@@ -65,7 +66,7 @@ int jack_client_max_real_time_priority (jack_client_t*);
* @returns 0, if successful; EPERM, if the calling process lacks
* required realtime privileges; otherwise some other error number.
*/
int jack_acquire_real_time_scheduling (pthread_t thread, int priority);
int jack_acquire_real_time_scheduling (pthread_t thread, int priority) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Create a thread for JACK or one of its clients. The thread is
......@@ -88,7 +89,7 @@ int jack_client_create_thread (jack_client_t* client,
int priority,
int realtime, /* boolean */
void *(*start_routine)(void*),
void *arg);
void *arg) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Drop realtime scheduling for a thread.
......@@ -97,7 +98,7 @@ int jack_client_create_thread (jack_client_t* client,
*
* @returns 0, if successful; otherwise an error number.
*/
int jack_drop_real_time_scheduling (pthread_t thread);
int jack_drop_real_time_scheduling (pthread_t thread) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Stop the thread, waiting for the thread handler to terminate.
......@@ -106,7 +107,7 @@ int jack_drop_real_time_scheduling (pthread_t thread);
*
* @returns 0, if successful; otherwise an error number.
*/
int jack_client_stop_thread(jack_client_t* client, pthread_t thread);
int jack_client_stop_thread(jack_client_t* client, pthread_t thread) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Cancel the thread then waits for the thread handler to terminate.
......@@ -115,7 +116,7 @@ int jack_client_stop_thread(jack_client_t* client, pthread_t thread);
*
* @returns 0, if successful; otherwise an error number.
*/
int jack_client_kill_thread(jack_client_t* client, pthread_t thread);
int jack_client_kill_thread(jack_client_t* client, pthread_t thread) JACK_OPTIONAL_WEAK_EXPORT;
#ifndef WIN32
......@@ -142,7 +143,7 @@ int jack_client_stop_thread(jack_client_t* client, pthread_t thread);
* @param creator a function that creates a new thread
*
*/
void jack_set_thread_creator (jack_thread_creator_t creator);
void jack_set_thread_creator (jack_thread_creator_t creator) JACK_OPTIONAL_WEAK_EXPORT;
#endif
......
......@@ -26,6 +26,7 @@ extern "C" {
#endif
#include <jack/types.h>
#include <jack/weakmacros.h>
/**
* @defgroup TransportControl Transport and Timebase control
......@@ -48,7 +49,7 @@ extern "C" {
*
* @return 0 on success, otherwise a non-zero error code.
*/
int jack_release_timebase (jack_client_t *client);
int jack_release_timebase (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Register (or unregister) as a slow-sync client, one that cannot
......@@ -72,7 +73,7 @@ int jack_release_timebase (jack_client_t *client);
*/
int jack_set_sync_callback (jack_client_t *client,
JackSyncCallback sync_callback,
void *arg);
void *arg) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Set the timeout value for slow-sync clients.
......@@ -92,7 +93,7 @@ int jack_set_sync_callback (jack_client_t *client,
* @return 0 on success, otherwise a non-zero error code.
*/
int jack_set_sync_timeout (jack_client_t *client,
jack_time_t timeout);
jack_time_t timeout) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Register as timebase master for the JACK subsystem.
......@@ -122,7 +123,7 @@ int jack_set_sync_timeout (jack_client_t *client,
int jack_set_timebase_callback (jack_client_t *client,
int conditional,
JackTimebaseCallback timebase_callback,
void *arg);
void *arg) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Reposition the transport to a new frame number.
......@@ -141,7 +142,7 @@ int jack_set_timebase_callback (jack_client_t *client,
* @return 0 if valid request, non-zero otherwise.
*/
int jack_transport_locate (jack_client_t *client,
jack_nframes_t frame);
jack_nframes_t frame) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Query the current transport state and position.
......@@ -159,7 +160,7 @@ int jack_transport_locate (jack_client_t *client,
* @return Current transport state.
*/
jack_transport_state_t jack_transport_query (const jack_client_t *client,
jack_position_t *pos);
jack_position_t *pos) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Return an estimate of the current transport frame,
......@@ -168,7 +169,7 @@ jack_transport_state_t jack_transport_query (const jack_client_t *client,
*
* @param client the JACK client structure
*/
jack_nframes_t jack_get_current_transport_frame (const jack_client_t *client);
jack_nframes_t jack_get_current_transport_frame (const jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Request a new transport position.
......@@ -187,7 +188,7 @@ jack_nframes_t jack_get_current_transport_frame (const jack_client_t *client);
* @return 0 if valid request, EINVAL if position structure rejected.
*/
int jack_transport_reposition (jack_client_t *client,
jack_position_t *pos);
jack_position_t *pos) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Start the JACK transport rolling.
......@@ -200,7 +201,7 @@ int jack_transport_reposition (jack_client_t *client,
*
* @param client the JACK client structure.
*/
void jack_transport_start (jack_client_t *client);
void jack_transport_start (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Stop the JACK transport.
......@@ -210,7 +211,7 @@ void jack_transport_start (jack_client_t *client);
*
* @param client the JACK client structure.
*/
void jack_transport_stop (jack_client_t *client);
void jack_transport_stop (jack_client_t *client) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Gets the current transport info structure (deprecated).
......@@ -225,7 +226,7 @@ void jack_transport_stop (jack_client_t *client);
* @pre Must be called from the process thread.
*/
void jack_get_transport_info (jack_client_t *client,
jack_transport_info_t *tinfo);
jack_transport_info_t *tinfo) JACK_OPTIONAL_WEAK_EXPORT;
/**
* Set the transport info structure (deprecated).
......@@ -235,7 +236,7 @@ void jack_get_transport_info (jack_client_t *client,
* a ::JackTimebaseCallback.
*/
void jack_set_transport_info (jack_client_t *client,
jack_transport_info_t *tinfo);
jack_transport_info_t *tinfo) JACK_OPTIONAL_WEAK_EXPORT;
/*@}*/
......
/*
Copyright (C) 2010 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __weakjack_h__
#define __weakjack_h__
#ifndef JACK_OPTIONAL_WEAK_EXPORT
/* JACK_OPTIONAL_WEAK_EXPORT needs to be a macro which
expands into a compiler directive. If non-null, the directive
must tell the compiler to arrange for weak linkage of
the symbol it used with. For this to work fully may
require linker arguments for the client as well.
*/
#ifdef __GNUC__
#define JACK_OPTIONAL_WEAK_EXPORT __attribute__((__weak__))
#else
/* Add other things here for non-gcc platforms */
#endif
#endif
#ifndef JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT
/* JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT needs to be a macro
which expands into a compiler directive. If non-null, the directive
must tell the compiler to arrange for weak linkage of the
symbol it is used with AND optionally to mark the symbol
as deprecated. For this to work fully may require
linker arguments for the client as well.
*/
#ifdef __GNUC__
#define JACK_OPTIONAL_WEAK_DEPRECATED_EXPORT __attribute__((__weak__,__deprecated__))
#else