   thread_num = global_thread_num;
    (void)pthread_mutex_unlock(&amp;thread_num_lock);

    /* Initialize the random number generator */
    srand((u_int)pthread_self());

    /* Write 50 times and then quit */
    for (i = 0; i &lt; 50; i++) {
        retry_count = 0; /* Used for deadlock retries */

retry:
        ret = envp-&gt;txn_begin(envp, NULL, &amp;txn, 0);
        if (ret != 0) {
            envp-&gt;err(envp, ret, "txn_begin failed");
            return (EXIT_FAILURE);
        }
        for (j 