summaryrefslogtreecommitdiff
path: root/libgo/runtime/runtime.h
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-31 00:59:47 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2015-10-31 00:59:47 +0000
commit4a3da3a8a45d5496118798146de1fa4e5798ed5a (patch)
tree13beeaed3698c61903fe93fb1ce70bd9b18d4e7f /libgo/runtime/runtime.h
parentcd529f4d86a17a3e8959f2cb5ac7132a841ab6f1 (diff)
downloadgcc-4a3da3a8a45d5496118798146de1fa4e5798ed5a.tar.gz
runtime: Remove now unnecessary pad field from ParFor.
It is not needed due to the removal of the ctx field. Reviewed-on: https://go-review.googlesource.com/16525 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229616 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/runtime/runtime.h')
-rw-r--r--libgo/runtime/runtime.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/libgo/runtime/runtime.h b/libgo/runtime/runtime.h
index b9264236227..cbf1fe160b9 100644
--- a/libgo/runtime/runtime.h
+++ b/libgo/runtime/runtime.h
@@ -421,17 +421,15 @@ struct LFNode
// Parallel for descriptor.
struct ParFor
{
- void (*body)(ParFor*, uint32); // executed for each element
+ const FuncVal *body; // executed for each element
uint32 done; // number of idle threads
uint32 nthr; // total number of threads
uint32 nthrmax; // maximum number of threads
uint32 thrseq; // thread id sequencer
uint32 cnt; // iteration space [0, cnt)
- void *ctx; // arbitrary user context
bool wait; // if true, wait while all threads finish processing,
// otherwise parfor may return while other threads are still working
ParForThread *thr; // array of thread descriptors
- uint32 pad; // to align ParForThread.pos for 64-bit atomic operations
// stats
uint64 nsteal;
uint64 nstealcnt;
@@ -544,6 +542,7 @@ void runtime_schedinit(void);
void runtime_initsig(void);
void runtime_sigenable(uint32 sig);
void runtime_sigdisable(uint32 sig);
+void runtime_sigignore(uint32 sig);
int32 runtime_gotraceback(bool *crash);
void runtime_goroutineheader(G*);
void runtime_printtrace(Location*, int32, bool);
@@ -552,8 +551,8 @@ void runtime_printtrace(Location*, int32, bool);
#define runtime_write(d, v, n) write((d), (v), (n))
#define runtime_close(d) close(d)
void runtime_ready(G*);
-const byte* runtime_getenv(const char*);
-int32 runtime_atoi(const byte*);
+String runtime_getenv(const char*);
+int32 runtime_atoi(const byte*, intgo);
void* runtime_mstart(void*);
G* runtime_malg(int32, byte**, size_t*);
void runtime_mpreinit(M*);
@@ -713,12 +712,11 @@ LFNode* runtime_lfstackpop(uint64 *head);
* Parallel for over [0, n).
* body() is executed for each iteration.
* nthr - total number of worker threads.
- * ctx - arbitrary user context.
* if wait=true, threads return from parfor() when all work is done;
* otherwise, threads can return while other threads are still finishing processing.
*/
ParFor* runtime_parforalloc(uint32 nthrmax);
-void runtime_parforsetup(ParFor *desc, uint32 nthr, uint32 n, void *ctx, bool wait, void (*body)(ParFor*, uint32));
+void runtime_parforsetup(ParFor *desc, uint32 nthr, uint32 n, bool wait, const FuncVal *body);
void runtime_parfordo(ParFor *desc);
void runtime_parforiters(ParFor*, uintptr, uintptr*, uintptr*);