Print this page
5042 stop using deprecated atomic functions


  57         struct keysockparam_s   *keystack_params;
  58 
  59         kmutex_t                keystack_param_lock;
  60                                 /* Protects the NDD variables. */
  61 
  62         /* List of open PF_KEY sockets, protected by keysock_list_lock. */
  63         kmutex_t                keystack_list_lock;
  64         struct keysock_s        *keystack_list;
  65 
  66         /*
  67          * Consumers table. If an entry is NULL, keysock maintains
  68          * the table.
  69          */
  70         kmutex_t                keystack_consumers_lock;
  71 
  72 #define KEYSOCK_MAX_CONSUMERS 256
  73         struct keysock_consumer_s *keystack_consumers[KEYSOCK_MAX_CONSUMERS];
  74 
  75         /*
  76          * State for flush/dump.  This would normally be a boolean_t, but
  77          * cas32() works best for a known 32-bit quantity.
  78          */
  79         uint32_t                keystack_flushdump;
  80         int                     keystack_flushdump_errno;
  81 
  82         /*
  83          * This integer counts the number of extended REGISTERed sockets.  This
  84          * determines if we should send extended REGISTERs.
  85          */
  86         uint32_t                keystack_num_extended;
  87 
  88         /*
  89          * Global sequence space for SADB_ACQUIRE messages of any sort.
  90          */
  91         uint32_t                keystack_acquire_seq;
  92 };
  93 typedef struct keysock_stack keysock_stack_t;
  94 
  95 /*
  96  * keysock session state (one per open PF_KEY socket (i.e. as a driver))
  97  *




  57         struct keysockparam_s   *keystack_params;
  58 
  59         kmutex_t                keystack_param_lock;
  60                                 /* Protects the NDD variables. */
  61 
  62         /* List of open PF_KEY sockets, protected by keysock_list_lock. */
  63         kmutex_t                keystack_list_lock;
  64         struct keysock_s        *keystack_list;
  65 
  66         /*
  67          * Consumers table. If an entry is NULL, keysock maintains
  68          * the table.
  69          */
  70         kmutex_t                keystack_consumers_lock;
  71 
  72 #define KEYSOCK_MAX_CONSUMERS 256
  73         struct keysock_consumer_s *keystack_consumers[KEYSOCK_MAX_CONSUMERS];
  74 
  75         /*
  76          * State for flush/dump.  This would normally be a boolean_t, but
  77          * atomic_cas_32() works best for a known 32-bit quantity.
  78          */
  79         uint32_t                keystack_flushdump;
  80         int                     keystack_flushdump_errno;
  81 
  82         /*
  83          * This integer counts the number of extended REGISTERed sockets.  This
  84          * determines if we should send extended REGISTERs.
  85          */
  86         uint32_t                keystack_num_extended;
  87 
  88         /*
  89          * Global sequence space for SADB_ACQUIRE messages of any sort.
  90          */
  91         uint32_t                keystack_acquire_seq;
  92 };
  93 typedef struct keysock_stack keysock_stack_t;
  94 
  95 /*
  96  * keysock session state (one per open PF_KEY socket (i.e. as a driver))
  97  *