This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <type_traits> | |
| #define DECLARE_HASA(what) \ | |
| template<typename T, typename = int> struct has_##what : std::false_type { };\ | |
| template<typename T> struct has_##what<T, decltype((void) T::what, 0)> : std::true_type {}; | |
| DECLARE_HASA(when) //declares above statement with 'when' replacing 'what' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # To use, put in the file: | |
| # /etc/libvirt/hooks/qemu | |
| # remember to chmod +x | |
| echo $1 $2 | |
| cores=$(grep -c ^processor /proc/cpuinfo) | |
| last_core=$((cores-1)) | |
| host_cpuset="0-$last_core" |
OlderNewer