Miscellaneous Utility Module
+ Collaboration diagram for Miscellaneous Utility Module:

Functions

float swapf32 (float f)
 Byte swaps 32 bit floating point number. More...
 
double swapf64 (double f)
 Byte swaps 64 bit floating point number. More...
 
void jit_global_critical_enter (void)
 Enters the global Jitter critical region. More...
 
void jit_global_critical_exit (void)
 Exits the global Jitter critical region. More...
 
void jit_error_sym (void *x, t_symbol *s)
 Sends symbol based error message to Max console (safe from all threads) More...
 
void jit_error_code (void *x, t_jit_err v)
 Sends error code based error message to Max console (safe from all threads) More...
 
void jit_post_sym (void *x, t_symbol *s)
 Sends symbol based message to Max console (safe from all threads) More...
 
t_jit_err jit_err_from_max_err (t_max_err err)
 Converts Max style error codes to Jitter style error codes. More...
 
void jit_rand_setseed (long n)
 Sets global random number generator seed. More...
 
long jit_rand (void)
 Generates a random value as a signed long integer. More...
 

Detailed Description

Function Documentation

void jit_error_code ( void *  x,
t_jit_err  v 
)

Sends error code based error message to Max console (safe from all threads)

Parameters
xobject pointer
verror code

References defer().

Referenced by max_jit_attr_getdump(), and max_jit_mop_jit_matrix().

+ Here is the call graph for this function:

void jit_error_sym ( void *  x,
t_symbol s 
)

Sends symbol based error message to Max console (safe from all threads)

Parameters
xobject pointer
serror message symbol

References defer().

+ Here is the call graph for this function:

void jit_global_critical_enter ( void  )

Enters the global Jitter critical region.

This function is useful for simple protection of thread sensitive operations. However, it may be too broad a lock, as it prevents any other operations that use the global critical region from working. For more localized control, I would suggest using either Max's systhread API or the platform specific locking mechanisms however, be sensitive to the possibility deadlock when locking code which calls code which may require the locking off unknown resources.

References critical_enter().

+ Here is the call graph for this function:

void jit_global_critical_exit ( void  )

Exits the global Jitter critical region.

This function is useful for simple protection of thread sensitive operations. However, it may be too broad a lock, as it prevents any other operations that use the global critical region from working. For more localized control, I would suggest using either Max's systhread API or the platform specific locking mechanisms however, be sensitive to the possibility deadlock when locking code which calls code which may require the locking off unknown resources.

References critical_exit().

+ Here is the call graph for this function:

void jit_post_sym ( void *  x,
t_symbol s 
)

Sends symbol based message to Max console (safe from all threads)

Parameters
xobject pointer
smessage symbol

References defer().

+ Here is the call graph for this function:

long jit_rand ( void  )

Generates a random value as a signed long integer.

Returns
random value
void jit_rand_setseed ( long  n)

Sets global random number generator seed.

Parameters
nseed

References systime_ticks().

+ Here is the call graph for this function:

float swapf32 ( float  f)

Byte swaps 32 bit floating point number.

Parameters
finput float
Returns
byte swapped float
double swapf64 ( double  f)

Byte swaps 64 bit floating point number.

Parameters
finput double
Returns
byte swapped double
  Copyright © 2015, Cycling '74