File: //lib/python3.9/site-packages/tuned/plugins/__pycache__/plugin_rtentsk.cpython-39.opt-1.pyc
a
,�g � @ s` d dl mZ d dlT ddlZddlmZ ddlZddlZddl Z ej
�� ZG dd� dej
�ZdS )� )�base)�*� N)�commandsc @ s e Zd ZdZdd� Zdd� ZdS )�
RTENTSKPluginz�
A plug-in for avoiding inter-processor interrupts caused by enabling
or disabling static keys.
The plug-in has no options; when included, **TuneD** will keep an open
socket with timestamping enabled, thus keeping the static key enabled.
c C sL d|_ d|_d}d}t�tjtjtj�}|�tj||� || _t �
d� d S )NTF� i @ z*opened SOF_TIMESTAMPING_OPT_TX_SWHW socket)Z_has_static_tuningZ_has_dynamic_tuning�socketZAF_INETZ
SOCK_DGRAMZIPPROTO_UDPZ
setsockoptZ
SOL_SOCKET�rtentsk_socket�log�info)�self�instanceZSO_TIMESTAMPZSOF_TIMESTAMPING_OPT_TX_SWHW�s� r �@/usr/lib/python3.9/site-packages/tuned/plugins/plugin_rtentsk.py�_instance_init s zRTENTSKPlugin._instance_initc C s | j }|�� d S )N)r �close)r r
r r r r �_instance_cleanup$ s zRTENTSKPlugin._instance_cleanupN)�__name__�
__module__�__qualname__�__doc__r r r r r r r s r )� r Z
decoratorsZ
tuned.logsZtunedZtuned.utils.commandsr �globr �timeZlogs�getr
ZPluginr r r r r �<module> s