src/share/vm/runtime/task.hpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 52,61 **** --- 52,62 ---- int _counter; const int _interval; static int _num_tasks; static PeriodicTask* _tasks[PeriodicTask::max_tasks]; + // Can only be called by the WatcherThread static void real_time_tick(int delay_time); #ifndef PRODUCT static elapsedTimer _timer; // measures time between ticks static int _ticks; // total number of ticks
*** 96,105 **** --- 97,107 ---- return _interval - _counter; } // Calculate when the next periodic task will fire. // Called by the WatcherThread's run method. + // Requires the PeriodicTask_lock. static int time_to_wait(); // The task to perform at each period virtual void task() = 0; };