YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
int rt_num_threads; int litmus; int thread_number= 0, timeouts= 0; void run_test(constchar *test, pthread_handler handler, int n, int m)
{
pthread_t *threads;
ulonglong now= my_getsystime(); int i;
thread_number= timeouts= 0;
litmus= 0;
threads= (pthread_t *)my_malloc(sizeof(void *)*n, MYF(0)); if (!threads)
{
diag("Out of memory");
abort();
}
diag("Running %s with %d threads, %d iterations... ", test, n, m);
rt_num_threads= n; for (i= 0; i < n ; i++) if (pthread_create(threads+i, 0, handler, &m))
{
diag("Could not create thread");
abort();
} for (i= 0 ; i < n ; i++)
pthread_join(threads[i], 0);
now= my_getsystime()-now;
ok(litmus == 0, "Finished %s in %g secs (%d)", test, ((double)now)/1e7, litmus);
my_free((void*)threads, MYF(0));
}
pthread_mutex_t rt_mutex; int Nrows= 100; int Ntables= 10; int table_lock_ratio= 10; enum lockman_lock_type lock_array[6]= {S, X, LS, LX, IS, IX}; char *lock2str[6]= {"S", "X", "LS", "LX", "IS", "IX"}; char *res2str[4]= { "DIDN'T GET THE LOCK", "GOT THE LOCK", "GOT THE LOCK NEED TO LOCK A SUBRESOURCE", "GOT THE LOCK NEED TO INSTANT LOCK A SUBRESOURCE"};
pthread_handler_t test_lockman(void *arg)
{ int m= (*(int *)arg);
uint x, loid, row, table, res, locklevel, timeout= 0;
LOCK_OWNER *lo;
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.12Bemerkung:
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.