~thomir-deactivatedaccount/drizzle/drizzle-fix-bug653747

« back to all changes in this revision

Viewing changes to plugin/innobase/ut/ut0auxconf_atomic_pthread_t_solaris.c

  • Committer: Brian Aker
  • Date: 2010-10-10 02:07:52 UTC
  • mfrom: (1827.2.3 staging)
  • Revision ID: brian@tangent.org-20101010020752-ktv73isay5dxtvp3
Merge in switch on table_share_instance inheritance.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
*****************************************************************************/
18
18
 
19
19
/*****************************************************************************
20
 
If this program compiles and returns 0, then pthread_t objects can be used as
21
 
arguments to Solaris libc atomic functions.
 
20
If this program compiles, then pthread_t objects can be used as arguments
 
21
to Solaris libc atomic functions.
22
22
 
23
23
Created April 18, 2009 Vasil Dimov
24
24
*****************************************************************************/
25
25
 
26
26
#include <pthread.h>
27
 
#include <string.h>
28
27
 
29
28
int
30
29
main(int argc, char** argv)
31
30
{
32
 
        pthread_t       x1;
33
 
        pthread_t       x2;
34
 
        pthread_t       x3;
35
 
 
36
 
        memset(&x1, 0x0, sizeof(x1));
37
 
        memset(&x2, 0x0, sizeof(x2));
38
 
        memset(&x3, 0x0, sizeof(x3));
39
 
 
40
 
        if (sizeof(pthread_t) == 4) {
41
 
 
42
 
                atomic_cas_32(&x1, x2, x3);
43
 
 
44
 
        } else if (sizeof(pthread_t) == 8) {
45
 
 
46
 
                atomic_cas_64(&x1, x2, x3);
47
 
 
48
 
        } else {
49
 
 
50
 
                return(1);
51
 
        }
 
31
        pthread_t       x = 0;
52
32
 
53
33
        return(0);
54
34
}