~ubuntu-branches/ubuntu/trusty/emscripten/trusty-proposed

« back to all changes in this revision

Viewing changes to tests/core/test_atomic.in

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2014-01-19 14:12:40 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140119141240-jg1l42cc158j59tn
Tags: 1.9.0~20140119~7dc8c2f-1
* New snapshot release (Closes: #733714)
* Provide sources for javascript and flash. Done in orig-tar.sh
  Available in third_party/websockify/include/web-socket-js/src/
  (Closes: #735903)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdio.h>
 
2
int main() {
 
3
  int x = 10;
 
4
  int y = __sync_add_and_fetch(&x, 5);
 
5
  printf("*%d,%d*\n", x, y);
 
6
  x = 10;
 
7
  y = __sync_fetch_and_add(&x, 5);
 
8
  printf("*%d,%d*\n", x, y);
 
9
  x = 10;
 
10
  y = __sync_lock_test_and_set(&x, 6);
 
11
  printf("*%d,%d*\n", x, y);
 
12
  x = 10;
 
13
  y = __sync_bool_compare_and_swap(&x, 9, 7);
 
14
  printf("*%d,%d*\n", x, y);
 
15
  y = __sync_bool_compare_and_swap(&x, 10, 7);
 
16
  printf("*%d,%d*\n", x, y);
 
17
  return 0;
 
18
}