LCOV - code coverage report
Current view: directory - src/trusted/service_runtime - nacl_stack_safety.c (source / functions) Found Hit Coverage
Test: coverage.lcov Lines: 8 8 100.0 %
Date: 2012-02-16 Functions: 0 0 -

       1                 : /*
       2                 :  * Copyright (c) 2011 The Native Client Authors. All rights reserved.
       3                 :  * Use of this source code is governed by a BSD-style license that can be
       4                 :  * found in the LICENSE file.
       5                 :  */
       6                 : 
       7                 : #include "native_client/src/trusted/service_runtime/nacl_stack_safety.h"
       8                 : 
       9                 : #if (NACL_WINDOWS && NACL_ARCH(NACL_BUILD_ARCH) == NACL_x86 &&  \
      10                 :      NACL_BUILD_SUBARCH == 64)
      11                 : 
      12                 : #include <windows.h>
      13                 : 
      14                 : #include "native_client/src/include/portability.h"
      15                 : 
      16                 : /*
      17                 :  * The default should be "true" so that we can handle crashes that
      18                 :  * occur on threads other than those created by NaClAppThread.
      19                 :  */
      20                 : THREAD uint32_t nacl_on_safe_stack = 1;
      21                 : 
      22                 : void NaClStackSafetyInit(void) {
      23                 : }
      24                 : 
      25                 : void NaClStackSafetyFini(void) {
      26                 : }
      27                 : 
      28                 : void NaClStackSafetyNowOnUntrustedStack(void) {
      29                 :   nacl_on_safe_stack = 0;
      30                 : }
      31                 : 
      32                 : void NaClStackSafetyNowOnTrustedStack(void) {
      33                 :   nacl_on_safe_stack = 1;
      34                 : }
      35                 : 
      36                 : #else
      37                 : 
      38              14 : void NaClStackSafetyInit(void) {
      39              14 : }
      40                 : 
      41               9 : void NaClStackSafetyFini(void) {
      42               9 : }
      43                 : 
      44             562 : void NaClStackSafetyNowOnUntrustedStack(void) {
      45             562 : }
      46                 : 
      47             562 : void NaClStackSafetyNowOnTrustedStack(void) {
      48             562 : }
      49                 : 
      50                 : #endif

Generated by: LCOV version 1.7