File: fork.pyx

package info (click to toggle)
rdma-core 56.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 17,196 kB
  • sloc: ansic: 171,361; python: 13,724; sh: 2,774; perl: 1,465; makefile: 73
file content (17 lines) | stat: -rw-r--r-- 423 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB)
# Copyright 2021 Amazon.com, Inc. or its affiliates. All rights reserved.

#cython: language_level=3

from pyverbs.base import PyverbsRDMAError
cimport pyverbs.libibverbs as v


def fork_init():
    ret = v.ibv_fork_init()
    if ret:
        raise PyverbsRDMAError('Failed to init fork support', ret)


def is_fork_initialized():
    return v.ibv_is_fork_initialized()