equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
57 class AbstractGangTask VALUE_OBJ_CLASS_SPEC { |
57 class AbstractGangTask VALUE_OBJ_CLASS_SPEC { |
58 const char* _name; |
58 const char* _name; |
59 const uint _gc_id; |
59 const uint _gc_id; |
60 |
60 |
61 public: |
61 public: |
62 AbstractGangTask(const char* name) : |
62 explicit AbstractGangTask(const char* name) : |
63 _name(name), |
63 _name(name), |
64 _gc_id(GCId::current_raw()) |
64 _gc_id(GCId::current_or_undefined()) |
65 {} |
|
66 |
|
67 AbstractGangTask(const char* name, const uint gc_id) : |
|
68 _name(name), |
|
69 _gc_id(gc_id) |
|
70 {} |
65 {} |
71 |
66 |
72 // The abstract work method. |
67 // The abstract work method. |
73 // The argument tells you which member of the gang you are. |
68 // The argument tells you which member of the gang you are. |
74 virtual void work(uint worker_id) = 0; |
69 virtual void work(uint worker_id) = 0; |