LCOV - code coverage report
Current view: top level - monetdb5/scheduler - run_isolate.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 4 4 100.0 %
Date: 2021-10-13 02:24:04 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /*
       2             :  * This Source Code Form is subject to the terms of the Mozilla Public
       3             :  * License, v. 2.0.  If a copy of the MPL was not distributed with this
       4             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       5             :  *
       6             :  * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V.
       7             :  */
       8             : 
       9             : /*
      10             :  * @f run_isolate
      11             :  * @a M. Kersten
      12             :  * @+ Run isolation
      13             :  * Run isolation involves making available a private copy of the MAL
      14             :  * block being executed for further massaging, e.g. code replacements
      15             :  * or flow-of-control adjustments.
      16             :  * These changes should be confined to a single execution. The next time around
      17             :  * there may be a different situation to take care off. This is achieved by
      18             :  * replacing the current program with a private copy.
      19             :  *
      20             :  * The easiest way is to duplicate the MAL program and assign the old
      21             :  * version to its history. This way any reference to individual instructions
      22             :  * remain valid and the result of the schedule action can be inspected
      23             :  * with the debugger.
      24             :  * Its lifetime then is identical to that of the main program call.
      25             :  *
      26             :  * @end example
      27             :  * This function with its history remain available as long as f()
      28             :  * is defined.
      29             :  */
      30             : /*
      31             :  * @+ Isolation implementation
      32             :  */
      33             : #include "monetdb_config.h"
      34             : #include "mal.h"
      35             : #include "mal_instruction.h"
      36             : #include "mal_client.h"
      37             : #include "mal_exception.h"
      38             : 
      39             : #ifndef WIN32
      40             : #define __declspec(x)
      41             : #endif
      42             : 
      43             : extern __declspec(dllexport) str RUNisolation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
      44             : 
      45             : str
      46           1 : RUNisolation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p)
      47             : {
      48             :         (void) cntxt;
      49             :         (void) stk;
      50           1 :         addtoMalBlkHistory(mb);
      51           1 :         removeInstruction(mb, p);
      52           1 :         return MAL_SUCCEED;
      53             : }

Generated by: LCOV version 1.14