Revision 2d02ec653355e4f558bd3bb2ef0e442520de26f9 authored by Bradley Grainger on 16 June 2014, 22:41:46 UTC, committed by Bradley Grainger on 16 June 2014, 22:41:46 UTC
Some platforms, particularly Windows, do not have a single method that can
release both a held reader lock and a held writer lock; instead, a
separate method (ReleaseSRWLockShared or ReleaseSRWLockExclusive) must be
called in each case.

This may also be necessary to back MutexRW with a shared_mutex in C++14;
the current language proposal includes both an unlock() and a
shared_unlock() method.
1 parent 983c93d
Raw File
signal_test.cc
//  Copyright (c) 2013, Facebook, Inc.  All rights reserved.
//  This source code is licensed under the BSD-style license found in the
//  LICENSE file in the root directory of this source tree. An additional grant
//  of patent rights can be found in the PATENTS file in the same directory.
//
#include "port/stack_trace.h"
#include <assert.h>

namespace {
void f0() {
  char *p = nullptr;
  *p = 10;  /* SIGSEGV here!! */
}

void f1() {
  f0();
}

void f2() {
  f1();
}

void f3() {
  f2();
}
}  // namespace

int main() {
  rocksdb::port::InstallStackTraceHandler();

  f3();

  return 0;
}
back to top