rename the following methods:

tqparent parent
tqmask mask


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/arts@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent f7959a4e97
commit 2a73c38820

@ -54,7 +54,7 @@ GSL-Functions \- GSL Function Reference
.br .br
\fBgsl_transact\fP (\fIjob\fP, \fI...\fP); \fBgsl_transact\fP (\fIjob\fP, \fI...\fP);
.br .br
\fBgsl_engine_init\fP (\fIrun_threaded\fP, \fIblock_size\fP, \fIsample_freq\fP, \fIsub_sample_tqmask\fP); \fBgsl_engine_init\fP (\fIrun_threaded\fP, \fIblock_size\fP, \fIsample_freq\fP, \fIsub_sample_mask\fP);
.br .br
\fBgsl_engine_wait_on_trans\fP (); \fBgsl_engine_wait_on_trans\fP ();
.br .br
@ -403,7 +403,7 @@ First job
.PP .PP
Convenience function which openes up a new transaction, collects the \fINULL\fP terminated job list passed to the function, and commits the transaction. Convenience function which openes up a new transaction, collects the \fINULL\fP terminated job list passed to the function, and commits the transaction.
.PD .PD
.SS \fBgsl_engine_init\fP (\fIrun_threaded\fP, \fIblock_size\fP, \fIsample_freq\fP, \fIsub_sample_tqmask\fP); .SS \fBgsl_engine_init\fP (\fIrun_threaded\fP, \fIblock_size\fP, \fIsample_freq\fP, \fIsub_sample_mask\fP);
.PD 0 .PD 0
.IP \fIgboolean\ \ run_threaded\fP 27 .IP \fIgboolean\ \ run_threaded\fP 27
@ -411,7 +411,7 @@ Convenience function which openes up a new transaction, collects the \fINULL\fP
number of values to process block wise number of values to process block wise
.IP \fIguint\ \ \ \ \ sample_freq\fP 27 .IP \fIguint\ \ \ \ \ sample_freq\fP 27
.IP \fIguint\ \ \ \ \ sub_sample_tqmask\fP 27 .IP \fIguint\ \ \ \ \ sub_sample_mask\fP 27
.PD 1 .PD 1
.PP .PP

@ -1476,17 +1476,17 @@ GslErrorType
gsl_check_file (const gchar *file_name, gsl_check_file (const gchar *file_name,
const gchar *mode) const gchar *mode)
{ {
guint access_tqmask = 0; guint access_mask = 0;
guint check_file, check_dir, check_link; guint check_file, check_dir, check_link;
if (strchr (mode, 'r')) /* readable */ if (strchr (mode, 'r')) /* readable */
access_tqmask |= R_OK; access_mask |= R_OK;
if (strchr (mode, 'w')) /* writable */ if (strchr (mode, 'w')) /* writable */
access_tqmask |= W_OK; access_mask |= W_OK;
if (strchr (mode, 'x')) /* executable */ if (strchr (mode, 'x')) /* executable */
access_tqmask |= X_OK; access_mask |= X_OK;
if (access_tqmask && access (file_name, access_tqmask) < 0) if (access_mask && access (file_name, access_mask) < 0)
goto have_errno; goto have_errno;
check_file = strchr (mode, 'f') != NULL; /* open as file */ check_file = strchr (mode, 'f') != NULL; /* open as file */

@ -635,7 +635,7 @@ static gboolean gsl_engine_threaded = FALSE;
static GslThread *master_thread = NULL; static GslThread *master_thread = NULL;
guint gsl_externvar_bsize = 0; guint gsl_externvar_bsize = 0;
guint gsl_externvar_sample_freq = 0; guint gsl_externvar_sample_freq = 0;
guint gsl_externvar_sub_sample_tqmask = 0; guint gsl_externvar_sub_sample_mask = 0;
guint gsl_externvar_sub_sample_steps = 0; guint gsl_externvar_sub_sample_steps = 0;
/** /**
@ -652,20 +652,20 @@ void
gsl_engine_init (gboolean run_threaded, gsl_engine_init (gboolean run_threaded,
guint block_size, guint block_size,
guint sample_freq, guint sample_freq,
guint sub_sample_tqmask) guint sub_sample_mask)
{ {
g_return_if_fail (gsl_engine_initialized == FALSE); g_return_if_fail (gsl_engine_initialized == FALSE);
g_return_if_fail (block_size > 0 && block_size <= GSL_STREAM_MAX_VALUES); g_return_if_fail (block_size > 0 && block_size <= GSL_STREAM_MAX_VALUES);
g_return_if_fail (sample_freq > 0); g_return_if_fail (sample_freq > 0);
g_return_if_fail (sub_sample_tqmask < block_size); g_return_if_fail (sub_sample_mask < block_size);
g_return_if_fail ((sub_sample_tqmask & (sub_sample_tqmask + 1)) == 0); /* power of 2 */ g_return_if_fail ((sub_sample_mask & (sub_sample_mask + 1)) == 0); /* power of 2 */
gsl_engine_initialized = TRUE; gsl_engine_initialized = TRUE;
gsl_engine_threaded = run_threaded; gsl_engine_threaded = run_threaded;
gsl_externvar_bsize = block_size; gsl_externvar_bsize = block_size;
gsl_externvar_sample_freq = sample_freq; gsl_externvar_sample_freq = sample_freq;
gsl_externvar_sub_sample_tqmask = sub_sample_tqmask << 2; /* shift out sizeof (float) tqalignment */ gsl_externvar_sub_sample_mask = sub_sample_mask << 2; /* shift out sizeof (float) tqalignment */
gsl_externvar_sub_sample_steps = sub_sample_tqmask + 1; gsl_externvar_sub_sample_steps = sub_sample_mask + 1;
_gsl_tick_stamp_set_leap (block_size); _gsl_tick_stamp_set_leap (block_size);
ENG_DEBUG ("initialization: threaded=%s", gsl_engine_threaded ? "TRUE" : "FALSE"); ENG_DEBUG ("initialization: threaded=%s", gsl_engine_threaded ? "TRUE" : "FALSE");

@ -168,7 +168,7 @@ gfloat* gsl_engine_const_values (gfloat value);
void gsl_engine_init (gboolean threaded, void gsl_engine_init (gboolean threaded,
guint block_size, guint block_size,
guint sample_freq, guint sample_freq,
guint sub_sample_tqmask); guint sub_sample_mask);
typedef struct typedef struct
{ {
glong timeout; glong timeout;
@ -187,16 +187,16 @@ void gsl_engine_garbage_collect (void);
void gsl_engine_wait_on_trans (void); void gsl_engine_wait_on_trans (void);
#define gsl_engine_block_size() ((const guint) gsl_externvar_bsize + 0) #define gsl_engine_block_size() ((const guint) gsl_externvar_bsize + 0)
#define gsl_engine_sample_freq() ((const guint) gsl_externvar_sample_freq + 0) #define gsl_engine_sample_freq() ((const guint) gsl_externvar_sample_freq + 0)
#define gsl_engine_sub_sample_tqmask() ((const guint) gsl_externvar_sub_sample_tqmask + 0) #define gsl_engine_sub_sample_mask() ((const guint) gsl_externvar_sub_sample_mask + 0)
#define gsl_engine_sub_sample_steps() ((const guint) gsl_externvar_sub_sample_steps + 0) #define gsl_engine_sub_sample_steps() ((const guint) gsl_externvar_sub_sample_steps + 0)
#define gsl_engine_sub_sample_test(ptr) (((guint) (ptr)) & gsl_engine_sub_sample_tqmask ()) #define gsl_engine_sub_sample_test(ptr) (((guint) (ptr)) & gsl_engine_sub_sample_mask ())
#define GSL_SUB_SAMPLE_MATCH(ptr,sspatrn) (gsl_engine_sub_sample_test (ptr) == (sspatrn)) #define GSL_SUB_SAMPLE_MATCH(ptr,sspatrn) (gsl_engine_sub_sample_test (ptr) == (sspatrn))
/*< private >*/ /*< private >*/
extern guint gsl_externvar_bsize; extern guint gsl_externvar_bsize;
extern guint gsl_externvar_sample_freq; extern guint gsl_externvar_sample_freq;
extern guint gsl_externvar_sub_sample_tqmask; extern guint gsl_externvar_sub_sample_mask;
extern guint gsl_externvar_sub_sample_steps; extern guint gsl_externvar_sub_sample_steps;
#ifdef __cplusplus #ifdef __cplusplus

@ -187,7 +187,7 @@ struct _Magic
gulong offset; gulong offset;
guint data_size; guint data_size;
MagicCheckType magic_check; MagicCheckType magic_check;
guint32 data_tqmask; guint32 data_mask;
MagicData value; MagicData value;
guint read_string : 1; guint read_string : 1;
guint read_size : 1; guint read_size : 1;
@ -364,16 +364,16 @@ magic_parse_type (Magic *magic,
{ {
string += 1; string += 1;
if (string[0] == '0') if (string[0] == '0')
magic->data_tqmask = strtol (string, &f, string[1] == 'x' ? 16 : 8); magic->data_mask = strtol (string, &f, string[1] == 'x' ? 16 : 8);
else else
magic->data_tqmask = strtol (string, &f, 10); magic->data_mask = strtol (string, &f, 10);
if (f && *f != 0) if (f && *f != 0)
return FALSE; return FALSE;
while (*string) while (*string)
string++; string++;
} }
else else
magic->data_tqmask = 0xffffffff; magic->data_mask = 0xffffffff;
return *string == 0; return *string == 0;
} }
@ -464,31 +464,31 @@ magic_check_data (Magic *magic,
cmp = 1; cmp = 1;
break; break;
case MAGIC_CHECK_INT_EQUAL: case MAGIC_CHECK_INT_EQUAL:
data->v_int32 &= magic->data_tqmask; data->v_int32 &= magic->data_mask;
cmp = data->v_int32 == magic->value.v_int32; cmp = data->v_int32 == magic->value.v_int32;
break; break;
case MAGIC_CHECK_INT_GREATER: case MAGIC_CHECK_INT_GREATER:
data->v_int32 &= magic->data_tqmask; data->v_int32 &= magic->data_mask;
cmp = data->v_int32 > magic->value.v_int32; cmp = data->v_int32 > magic->value.v_int32;
break; break;
case MAGIC_CHECK_INT_SMALLER: case MAGIC_CHECK_INT_SMALLER:
data->v_int32 &= magic->data_tqmask; data->v_int32 &= magic->data_mask;
cmp = data->v_int32 < magic->value.v_int32; cmp = data->v_int32 < magic->value.v_int32;
break; break;
case MAGIC_CHECK_UINT_GREATER: case MAGIC_CHECK_UINT_GREATER:
data->v_uint32 &= magic->data_tqmask; data->v_uint32 &= magic->data_mask;
cmp = data->v_uint32 > magic->value.v_uint32; cmp = data->v_uint32 > magic->value.v_uint32;
break; break;
case MAGIC_CHECK_UINT_SMALLER: case MAGIC_CHECK_UINT_SMALLER:
data->v_uint32 &= magic->data_tqmask; data->v_uint32 &= magic->data_mask;
cmp = data->v_uint32 < magic->value.v_uint32; cmp = data->v_uint32 < magic->value.v_uint32;
break; break;
case MAGIC_CHECK_UINT_ZEROS: case MAGIC_CHECK_UINT_ZEROS:
data->v_uint32 &= magic->data_tqmask; data->v_uint32 &= magic->data_mask;
cmp = (data->v_int32 & magic->value.v_int32) == 0; cmp = (data->v_int32 & magic->value.v_int32) == 0;
break; break;
case MAGIC_CHECK_UINT_ONES: case MAGIC_CHECK_UINT_ONES:
data->v_uint32 &= magic->data_tqmask; data->v_uint32 &= magic->data_mask;
cmp = (data->v_int32 & magic->value.v_int32) == magic->value.v_int32; cmp = (data->v_int32 & magic->value.v_int32) == magic->value.v_int32;
break; break;
case MAGIC_CHECK_STRING_EQUAL: case MAGIC_CHECK_STRING_EQUAL:

@ -161,7 +161,7 @@ GSL_INCLUDER_FUNC (GslOscData *osc,
guint32 tpos, ifrac; guint32 tpos, ifrac;
gfloat ffrac, w; gfloat ffrac, w;
tpos = cur_pos >> wave->n_frac_bits; tpos = cur_pos >> wave->n_frac_bits;
ifrac = cur_pos & wave->frac_bittqmask; ifrac = cur_pos & wave->frac_bitmask;
ffrac = ifrac * wave->ifrac_to_float; ffrac = ifrac * wave->ifrac_to_float;
v = wave->values[tpos]; v = wave->values[tpos];
w = wave->values[tpos + 1]; w = wave->values[tpos + 1];

@ -131,9 +131,9 @@ osc_process (GslOscData *osc,
if_reject (mode != osc->last_mode) if_reject (mode != osc->last_mode)
{ {
guint change_tqmask = osc->last_mode >= OSC_FLAG_INVAL ? OSC_FLAG_INVAL : osc->last_mode ^ mode; guint change_mask = osc->last_mode >= OSC_FLAG_INVAL ? OSC_FLAG_INVAL : osc->last_mode ^ mode;
if (change_tqmask & OSC_FLAG_FREQ) if (change_mask & OSC_FLAG_FREQ)
{ {
gdouble fcpos, flpos; gdouble fcpos, flpos;

@ -395,7 +395,7 @@ gsl_osc_table_lookup (const GslOscTable *table,
wave->n_frac_bits = g_bit_storage (wave->n_values - 1); wave->n_frac_bits = g_bit_storage (wave->n_values - 1);
wave->n_frac_bits = 32 - wave->n_frac_bits; wave->n_frac_bits = 32 - wave->n_frac_bits;
int_one = 1 << wave->n_frac_bits; int_one = 1 << wave->n_frac_bits;
wave->frac_bittqmask = int_one - 1; wave->frac_bitmask = int_one - 1;
float_one = int_one; float_one = int_one;
wave->freq_to_step = float_one * wave->n_values / table->mix_freq; wave->freq_to_step = float_one * wave->n_values / table->mix_freq;
wave->phase_to_pos = wave->n_values * float_one; wave->phase_to_pos = wave->n_values * float_one;

@ -56,7 +56,7 @@ typedef struct
const gfloat *values; /* contains n_values+1 values with values[0]==values[n_values] */ const gfloat *values; /* contains n_values+1 values with values[0]==values[n_values] */
/* integer stepping (block size dependant) */ /* integer stepping (block size dependant) */
guint32 n_frac_bits; guint32 n_frac_bits;
guint32 frac_bittqmask; guint32 frac_bitmask;
gfloat freq_to_step; /* freq -> int.frac */ gfloat freq_to_step; /* freq -> int.frac */
gfloat phase_to_pos; /* 0..1 -> int.frac */ gfloat phase_to_pos; /* 0..1 -> int.frac */
gfloat ifrac_to_float; /* frac -> 0..1 float */ gfloat ifrac_to_float; /* frac -> 0..1 float */

@ -134,18 +134,18 @@ gsl_wave_osc_process (GslWaveOscData *wosc,
if_reject (mode != wosc->last_mode) if_reject (mode != wosc->last_mode)
{ {
guint tqmask = wosc->last_mode ^ mode; guint mask = wosc->last_mode ^ mode;
if (tqmask & WOSC_MIX_WITH_SYNC) if (mask & WOSC_MIX_WITH_SYNC)
wosc->last_sync_level = 0; wosc->last_sync_level = 0;
if (tqmask & WOSC_MIX_WITH_FREQ) if (mask & WOSC_MIX_WITH_FREQ)
{ {
if (freq_in) if (freq_in)
wosc->last_freq_level = SIGNAL_LEVEL_INVAL; wosc->last_freq_level = SIGNAL_LEVEL_INVAL;
else else
gsl_wave_osc_set_filter (wosc, wosc->config.cfreq, FALSE); gsl_wave_osc_set_filter (wosc, wosc->config.cfreq, FALSE);
} }
if (tqmask & WOSC_MIX_WITH_MOD) if (mask & WOSC_MIX_WITH_MOD)
{ {
if (mod_in) if (mod_in)
wosc->last_mod_level = 0; wosc->last_mod_level = 0;

@ -858,7 +858,7 @@ StdFlowSystem::StdFlowSystem()
* - the 44100 because of the obvious reason, that not every artsd * - the 44100 because of the obvious reason, that not every artsd
* is running at that rate * is running at that rate
*/ */
gsl_engine_init(false, 512, 44100, /* subsampletqmask */ 63); gsl_engine_init(false, 512, 44100, /* subsamplemask */ 63);
if(gslGlobalMutexTable) if(gslGlobalMutexTable)
arts_debug("gsl: using Unix98 pthreads directly for mutexes and conditions"); arts_debug("gsl: using Unix98 pthreads directly for mutexes and conditions");
/*gsl_engine_debug_enable(GslEngineDebugLevel(GSL_ENGINE_DEBUG_JOBS | GSL_ENGINE_DEBUG_SCHED));*/ /*gsl_engine_debug_enable(GslEngineDebugLevel(GSL_ENGINE_DEBUG_JOBS | GSL_ENGINE_DEBUG_SCHED));*/

@ -65,27 +65,27 @@ CrashHandler::setCrashHandler (HandlerType handler)
if (!handler) if (!handler)
handler = SIG_DFL; handler = SIG_DFL;
sigset_t tqmask; sigset_t mask;
sigemptyset(&tqmask); sigemptyset(&mask);
#ifdef SIGSEGV #ifdef SIGSEGV
signal (SIGSEGV, handler); signal (SIGSEGV, handler);
sigaddset(&tqmask, SIGSEGV); sigaddset(&mask, SIGSEGV);
#endif #endif
#ifdef SIGFPE #ifdef SIGFPE
signal (SIGFPE, handler); signal (SIGFPE, handler);
sigaddset(&tqmask, SIGFPE); sigaddset(&mask, SIGFPE);
#endif #endif
#ifdef SIGILL #ifdef SIGILL
signal (SIGILL, handler); signal (SIGILL, handler);
sigaddset(&tqmask, SIGILL); sigaddset(&mask, SIGILL);
#endif #endif
#ifdef SIGABRT #ifdef SIGABRT
signal (SIGABRT, handler); signal (SIGABRT, handler);
sigaddset(&tqmask, SIGABRT); sigaddset(&mask, SIGABRT);
#endif #endif
sigprocmask(SIG_UNBLOCK, &tqmask, 0); sigprocmask(SIG_UNBLOCK, &mask, 0);
_crashHandler = handler; _crashHandler = handler;
} }

Loading…
Cancel
Save