comparison dyncallback/dyncall_callback_sparc64.c @ 152:d48a8b8d2ef9

- integrated all headers containing DCCallback definition into the translation units used (arm64 already avoided this pointless header, so following that style) - some cleanups, removal of unnecessary includes, etc.
author cslag
date Sat, 22 Oct 2016 15:55:54 +0200
parents 82a0eef83db0
children 2f7a7f3472cb
comparison
equal deleted inserted replaced
151:dac66f0107ea 152:d48a8b8d2ef9
4 Library: dyncallback 4 Library: dyncallback
5 File: dyncallback/dyncall_callback_sparc64.c 5 File: dyncallback/dyncall_callback_sparc64.c
6 Description: Callback - Implementation for sparc64 (TODO: not implemented yet) 6 Description: Callback - Implementation for sparc64 (TODO: not implemented yet)
7 License: 7 License:
8 8
9 Copyright (c) 2007-2015 Daniel Adler <dadler@uni-goettingen.de>, 9 Copyright (c) 2007-2016 Daniel Adler <dadler@uni-goettingen.de>,
10 Tassilo Philipp <tphilipp@potion-studios.com> 10 Tassilo Philipp <tphilipp@potion-studios.com>
11 11
12 Permission to use, copy, modify, and distribute this software for any 12 Permission to use, copy, modify, and distribute this software for any
13 purpose with or without fee is hereby granted, provided that the above 13 purpose with or without fee is hereby granted, provided that the above
14 copyright notice and this permission notice appear in all copies. 14 copyright notice and this permission notice appear in all copies.
23 23
24 */ 24 */
25 25
26 26
27 #include "dyncall_callback.h" 27 #include "dyncall_callback.h"
28 #include "dyncall_callback_sparc32.h" 28 #include "dyncall_alloc_wx.h"
29 #include "dyncall_thunk.h"
29 30
30 #include "dyncall_alloc_wx.h" 31 /* Callback symbol. */
32 extern void dcCallbackThunkEntry();
33
34 struct DCCallback
35 {
36 DCThunk thunk; /* offset 0, size ?? */
37 DCCallbackHandler* handler; /* offset ??, size 4 */
38 size_t stack_cleanup; /* offset ??, size 4 */
39 void* userdata; /* offset ??, size 4 */
40 };
41
31 42
32 void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata) 43 void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata)
33 { 44 {
34 } 45 }
35
36 extern void dcCallbackThunkEntry();
37 46
38 DCCallback* dcbNewCallback(const char* signature, DCCallbackHandler* handler, void* userdata) 47 DCCallback* dcbNewCallback(const char* signature, DCCallbackHandler* handler, void* userdata)
39 { 48 {
40 DCCallback* pcb; 49 DCCallback* pcb;
41 int err = dcAllocWX(sizeof(DCCallback), (void**) &pcb); 50 int err = dcAllocWX(sizeof(DCCallback), (void**) &pcb);