]> git.proxmox.com Git - ovs.git/blame - lib/rculist.c
datapath-windows: Avoid BSOD when switch context is NULL
[ovs.git] / lib / rculist.c
CommitLineData
9f22b0cf
JR
1/*
2 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#include <config.h>
17#include "rculist.h"
18
19/* Initializes 'list' with pointers that will (probably) cause segfaults if
20 * dereferenced and, better yet, show up clearly in a debugger. */
21void
22rculist_poison__(struct rculist *list)
23 OVS_NO_THREAD_SAFETY_ANALYSIS
24{
25 list->prev = RCULIST_POISON;
26 ovsrcu_set_hidden(&list->next, RCULIST_POISON);
27}