[PATCH] Accommodate for Haiku atomics prototype changes
François Revol <[email protected]> Thu, 23 Jan 2014 14:46:57 +0100
| Newsgroups | gmane.editors.qemacs.devel |
|---|---|
| Message-ID | <[email protected]> |
Since we merged the scheduler branch, the prototypes for atomic ops in Haiku have changed, this patch fixes build on latest release. François. _______________________________________________ Qemacs-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/qemacs-devel
qemacs-haiku-atomics-changes.diff
(text/x-patch, 755 B)
Index: haiku.cpp
===================================================================
RCS file: /sources/qemacs/qemacs/haiku.cpp,v
retrieving revision 1.6
diff -u -r1.6 haiku.cpp
--- haiku.cpp 23 Jan 2014 12:56:22 -0000 1.6
+++ haiku.cpp 23 Jan 2014 13:38:43 -0000
@@ -55,7 +55,7 @@
static int events_wr;
/* count of pending repaints */
-static vint32 repaints = 0;
+static int32 repaints = 0;
//TODO:use double-buffering with a BBitmap
static void haiku_handle_event(void *opaque);
@@ -384,7 +384,7 @@
case _UPDATE_:
// flush queued repaints
- if (atomic_set(&repaints, 0)) {
+ if (atomic_get_and_set(&repaints, 0)) {
ev->expose_event.type = QE_EXPOSE_EVENT;
qe_handle_event(ev);
}