cubefs

Форк
0
/x
/
fcntl_darwin.go 
24 строки · 806.0 Байт
1
// Copyright 2019 The Go Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
4

5
package unix
6

7
import "unsafe"
8

9
// FcntlInt performs a fcntl syscall on fd with the provided command and argument.
10
func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
11
	return fcntl(int(fd), cmd, arg)
12
}
13

14
// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
15
func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
16
	_, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))
17
	return err
18
}
19

20
// FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command.
21
func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error {
22
	_, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore))))
23
	return err
24
}
25

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.