Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int t;
- void swap(int *x, int *y)
- {
- int s;
- s = t; // save global variable
- t = *x;
- *x = *y;
- // hardware interrupt might invoke isr() here!
- *y = t;
- t = s; // restore global variable
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement